VB Tutorial - TIBBO Technology
VB Tutorial - TIBBO Technology
VB Tutorial - TIBBO Technology
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3. Creating the WinSock Demo<br />
3.1. WinSock Demo action plan<br />
We will show you the basics of communicating with the DS100/EM100SK in three steps:<br />
• In step 1 we will create a very simple program that will be able to exchange the data with the Data<br />
Port of the DS100/EM100SK using an UDP/IP protocol<br />
• In step 2 we will show how to program (setup) the DS100/EM100 over the network. Same UDP/IP<br />
protocol will be used, but this time to communicate with the Command Port of the DS100/EM100SK<br />
• In step 3 we will show how to exchange data with the DS100/EM100 using the TCP/IP protocol.<br />
Supporting TCP/IP is slightly more difficult so we will do this at the end of the <strong>Tutorial</strong>.<br />
You can follow our instructions step-by-step or you can download a completed project for each of the<br />
steps from www.tibbo.com/downloads.htm. The projects are archived (.zip) and named “WinSock Demo<br />
Step1”, “WinSock Demo Step2”, and “WinSock Demo Step3”. Important: you may need to change the<br />
RemoteHost property of the WinSock control in each project to the actual IP-address you’ve set for your<br />
DS100/EM100.<br />
3.2. Step 1: creating a simple UDP/IP Demo<br />
Follow the instructions below to complete the first step of our action plan:<br />
• Lunch the Visual Basic (<strong>VB</strong>), choose the Standard EXE project<br />
• Rename the default form (Form1) to FormMain, set its caption to “WinSock Demo”<br />
• Save the project (and do use the Save button often!)<br />
• Add the WinSock control to your Project:<br />
o<br />
Choose Project"Components from the main menu- Components dialog will open