FieldPoint Commands Overview
FieldPoint commands are based on and compatible with the Optomux protocol, so that FieldPoint banks and Optomux devices can communicate with each other over networks.
FieldPoint commands are of two types, standard and extended. The standard commands are a subset of Optomux commands that provide maximum compatibility with existing Optomux servers and host software. After you configure a FieldPoint module or bank, you can use any generic Optomux server to communicate with it.
FieldPoint extended commands support all the features of FieldPoint, and National Instruments recommends that you use the extended commands whenever possible. The standard command descriptions include lists of the recommended extended commands.
If you are using FieldPoint software on a host, you do not need the detailed information in this help file because the FieldPoint server builds commands and parses responses for you.
Command Fields
All FieldPoint commands have the syntax described in this section and contain the following five fields in the order shown:
[start][address][command][checksum][end]
[start] | Each command starts with the ">" character (ASCII value 62). | ||||||||
[address] | Two ASCII-hex characters specify the address of the module that the command is intended for. The value of this field can be between 00 and F9 for networks built with the FP-1000 and FP-1001 FieldPoint network modules. The cFP-180x does not recognize addresses higher than 08. | ||||||||
[command] | This field is the body of the command. It is composed of the following four subfields, some of which may not be required for all FieldPoint commands: | ||||||||
| |||||||||
[checksum] | Two ASCII-hex characters. This field enables error checking for the command. Calculate the value of this field by adding the numeric values of all the characters in the [address] and [command] fields and determining the modulo-256 of the sum. Convert the modulus (remainder) of the division to two ASCII-hex characters to form the [checksum] field. | ||||||||
[end] | One ASCII-hex character. This field indicates the end of the command. You can use either a carriage return (ASCII value 13) or a "." (ASCII value 46) for this field. |
In the description of the individual commands later in this manual, only the fields that are relevant to the command are described. The [start] field, the [address] field, the [checksum] field, and the [end] field are not described for each command because they have the same syntax for all commands. The individual command descriptions include their use of the [command] field and its subfields.
Syntax Examples
The following example uses the standard command Write Analog Outputs. Consider the following command:
>34J0011456[checksum].
This command writes the value 0x456 to channels 0 and 4 of the FieldPoint module at address 0x34.
The ">" character is the [start] field, 34 is the [address] field, and J0011456 is the [command] field.
In the [command] field, J is the [cmdchar] subfield, 0011 is the [position] subfield, and 456 is the [data] subfield. Note that this command does not use a [modifier] subfield.
Calculate the checksum as follows:
Characters | 3 | 4 | J | 0 | 0 | 1 | 1 | 4 | 5 | 6 |
Numeric Values | 51 | 52 | 74 | 48 | 48 | 49 | 49 | 52 | 53 | 54 |
Numeric Sum | 530 |
Modulus | 18 (hex 12) |
Checksum | 12 |
The complete command with checksum is as follows:
>34J001145612.
In this example, the "." character is the [end] field.
The following example uses the extended command Write Discrete with the !o prefix:
>32!o!L00020080FFFF[checksum].
This command turns channels 7 and 17 ON on the FieldPoint digital output module at address 0x32.
The ">" character is the [start] field, 32 is the [address] field, and !o!L00020080FFFF is the [command] field.
Within the [command] field, !o!L is the [cmdchar] subfield, 00020080 is the [position] subfield, and FFFF is the [data] subfield. Note that this command does not use a [modifier] subfield.
Calculate the checksum as follows:
Characters | 3 | 2 | ! | o | ! | L | 0 | 0 | 0 | 2 | 0 | 0 | 8 | 0 | F | F | F | F |
Numeric Values | 51 | 50 | 33 | 111 | 33 | 76 | 48 | 48 | 48 | 50 | 48 | 48 | 56 | 48 | 70 | 70 | 70 | 70 |
Numeric Sum | 1028 |
Modulus | 4 (hex 4) |
Checksum | 04 |
The complete command with checksum is as follows:
>32!o!L00020080FFFF04.
In this example, the "." character is the [end] field.