FieldPoint Commands Overview

FieldPoint Optomux Programming

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:
[cmdchars]One, two, or four ASCII-hex characters. All FieldPoint commands must contain this subfield.

Standard commands have a single command character in the range "A"–"Z" or "a"–"i".

Extended commands have two characters and always begin with the "!" character (ASCII value 33). The second command character is in the range "A"–"Z" or "a"–"z".

Some extended commands support 32 channels. If you want to send one of those commands to a 32-channel module, you must precede the two command characters with "!o".
[position]Zero to four, or eight, ASCII-hex characters. Some FieldPoint commands do not contain this subfield.

This field specifies the FieldPoint module channels that the command targets. Each bit in this field represents one channel. Standard and extended commands can target up to 16 channels, and some extended commands can target up to 32 channels. Bit 31 represents channel 31, and bit 0 represents channel 0. Standard commands can contain zero to four characters in this field. Extended commands standardize this field to either no characters (when the command does not specify individual channels), four characters (when the command targets up to 16 channels), or eight characters (when the command supports 32 channels and the command characters in [cmdchars] are preceded by "!o").

Try to ensure that the [positions] field matches the number of channels on the module. Addressing channels that do not exist on the module can cause errors and unexpected behavior, especially when you are using analog commands.
[modifier]Zero or more ASCII-hex characters. Some FieldPoint commands do not contain this subfield. This field is used by commands that support multiple execution features.
[data]Zero or more ASCII-hex characters. Some FieldPoint commands do not contain this subfield. This field contains command-specific characters.
[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:

Characters34J0011456
Numeric Values51527448484949525354
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:

Characters32!o!L00020080FFFF
Numeric Values5150331113376484848504848564870707070
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.