Command-Phase TCP

Top  Previous  Next

 

note_further

This is considered to be an advanced method, and is slightly more complex than the others. Usually there is no need for command-phase TCP programming. This example merely illustrates the capabilities of this mode -- do not feel compelled to try it, if you have no use for this feature in your actual environment.

 

In command-phase programming, every network communication session starts with a programming session. So, to actually get to your device and start communicating with it, you would have to send the Logout (O) command first. And to be able to send this command (and log out), you would first have to be logged in. This is accomplished using the Login (L) command.

 

Now, to actually test this method of programming, do the following:

 

Run DS Manager.

 

Open the settings for the DS you want to configure.

 

Make sure its IP address is valid for your network, and note it down for later.

 

Switch to the Connection tab.

 

Make sure Transport protocol is TCP and that Routing Mode is Server (Slave).

 

Set Data login to Enabled. Both of these settings can be seen below:

 

an008_commandphase

 

Now, follow the instructions under Establishing a TCP/IP Connection with a Device Server and return here once you're done.

 

Send the first command, to login. As with all commands, you will not see what you send, but only what you receive:

 

Hit Ctrl+B.

 

Type L (capital L -- type l while pressing SHIFT)

 

Hit Enter.
You should get an STX (Smiley) and A. This means you are now logged on. It looks like this: an008_SmileyAndA.

 

Go to the Programming Exercise and start programming the device.

 

note_tip

To know all there is to know about Command-Phase programming, please read Command-Phase (TCP) Programming in the full manual.