Testing of the Winsock (ActiveX) with the SX Ethernet Demo Board and VBScripting
Lesson 1 "Setting up the Controls"

For this application to work correctly you will need MSWinsock Ver. 6.0 If you are unshure chech the windows registry under HKEY_CLASSES_ROOT\MSWinsock.Winsock\CLSID. Then use the keys number in the Object tag in the source. For more info consult your books on VBScripting and HTML tags.

If you are using the demo boards default program and webpage this app will work the best if you goto the controls page and turn on or off the led first. If you don't the app will turn it on and off untill the program in the sx catches up and starts it flashing again. You will also notice that the returned numbers will be diffrent once opening a web page.

If you get a message box that asks you if you want to run press yes.

Press the SendData button and watch what happens on the Demo Board. You will also want to try different numbers in the info box. Here is a little tip. You will need a number above or equal to 64 to get the led light to turn on and off. We will cover more in lesson Two.
This is the object tag for MSWINSOCK Ver. 6.0 Set up a form here and call it LabelControls, it will have no Action.
Put a textbox with a name of Port on the screen. This is where you will put the port number to communicate at. Default is 1025. SX'S PORT
Put a textbox with a name of Ip on the screen. This is where you will put the SX's ip address. SX'S IP
Put a textbox with a name of Data on the screen. This is where you will put what you want to write to the SX at. Info you want to write to SX 0 to 255.
Put a textbox with a name of Readout on the screen. This is the area wich will tell you what is happening when you press the SendData Button.

Put a Button with a name of CmdSend on the screen. This button will send data that is in the Data Textbox to the SX.
Go ahead and play around with what you have here. The next lesson will delve deeper into the udp protocol on the Ethernet demo Board with reading info and writing info.
Go ahead and if you have a question drop me a line at the following Address.
This code is free to anyone whom has a need for it.
(C) By: Timothy L. Hosey, Automated Panels. (2001-2002), Engineering, Extension 41367 Email Timothy Hosey