Programming Exercise

note_warning

If at any time during this procedure you get a D reply (looks like an008_SmileyAndD) you need to login again. Just send the Login (L) command again, as described here.

We are assuming you are already connected to the device server (and also logged on, if your connection method requires logging on). If this isn't so, please read the previous sections and create a working connection first.

Getting the IP Address

Send the second command, to get the current IP address of the Device Server:

Hit Ctrl+B.
Type GIP (In caps. This is the Get (G) command with the IP-address (IP) setting as an argument).
Hit Enter.
You should get an STX character, A, and the current IP address, like this: an008_SmileyAndIP

Getting the Current Flow Control Status

Now we will get the flow control status of the Device Server.

Hit Ctrl+B.
Type GFC (Get (G) command with the Flow Control (FC) setting as an argument).
Hit Enter.
You should get an STX char, an A (ack) and 1 (i.e, flow control is Enabled) or 0 (flow control is Disabled). Looks like this:

an008_SmileyAndA1

In this case, this means flow control is Enabled .

Changing the Flow Control Status

Now we will change it to disable flow control.

Hit Ctrl+B.
Type SFC0 (Set (S) command with the Flow Control (FC) setting as an argument, 0 = disabled).
Hit Enter.
You should get an STX character and A.

Now let's check again the Flow Control (FC) setting to see if it is indeed disabled:

Hit Ctrl+B.
Type GFC.
Hit Enter.
You should get an STX char, an A (ack) and 0 (i.e, flow control is disabled).

Logging Out

The last thing we will do is log out of the programming session:

Hit Ctrl+B.
Type O (Logout (O) command).
Hit Enter.
You will not see anything sent back to you, because the session has just ended.

That's it. You've now successfully performed a demo programming session. Well done!