Table of Contents

Input/Output (IO) CFLink Protocol

The following documentation describes the CFLink protocol for controlling IO ports on any device with IO's.
This includes IO modules and standalone devices such as the CF Mini.

Common Definitions

Port Modes

Throughout this document, the configuration and status of each port <MODE> and it's associated <STATE> refers to the following possibilities:

Queries

STA - Query Status

The STA (Status) query returns the status of all IO ports in a single module.

Data

// Modular devices
> [F2]<ID>[F3]QIOXSTA[F4]<MODULE>[F5][F5]
// Standalone devices
> [F2]<ID>[F3]QIOXSTA[F4][F5][F5]

Reply

// Modular devices
< [F2]<ID>[F3]RIOXSTA[F4]<MODULE>|<IODATA>[F5][F5]
// Standalone devices
< [F2]<ID>[F3]RIOXSTA[F4]<IODATA>[F5][F5]

Example

// Query the state of IO ports in Module 2 of a modular device on CFLink ID [04]
> [F2][04][F3]QIOXSTA[F4]M2[F5][F5]
// Reply, Module has 8 IO ports
< [F2][04][F3]RIOXSTA[F4]M2|P01:D:0|P02:D:1|P03:R:010|P04:V:125|P05:E:0|P06:L:1|P07:D:0|P08:S:1[F5][F5]
// Port 1 = Dry contact, Off
// Port 2 = Dry contact, On
// Port 3 = Resistence, 1000 Ohm reading
// Port 4 = Voltage, 12.5V reading
// Port 5 = External relay control, Off
// Port 6 = LED ouput, On
// Port 7 = Dry contact, Off
// Port 8 = Video Sense, video signal present.

Error

PRT - Query Port Settings

The PRT (Port) query returns the configuration for all IO ports in a single module.

Data

// Modular devices
> [F2]<ID>[F3]QIOXPRT[F4]<MODULE>[F5][F5]
// Standalone devices
> [F2]<ID>[F3]QIOXPRT[F4][F5][F5]

Reply

// Modular devices
< [F2]<ID>[F3]RIOXPRT[F4]<MODULE>|<PORT_CONFIG>[F5][F5]
// Standalone devices
< [F2]<ID>[F3]RIOXPRT[F4]<PORT_CONFIG>[F5][F5]

Example

// Query the configuration of IO ports in Module 1 of a modular device on CFLink ID [04]
> [F2][04][F3]QIOXPRT[F4]M1[F5][F5]
// Reply, Module has 8 IO ports
< [F2][04][F3]RIOXPRT[F4]M1|P01:D:0:0|P02:D:0:0|P03:R:15:0|P04:V:12:0|P05:E:0:0|P06:L:0:1|P07:D:0:0|P08:D:0:0[F5][F5]
// Port 1 = Dry contact
// Port 2 = Dry contact
// Port 3 = Resistence, 1500 Ohm minimum change
// Port 4 = Voltage, 1.2 V minimum change
// Port 5 = External relay control, Power On State = Off
// Port 6 = LED ouput, Power On State = On
// Port 7 = Dry contact
// Port 8 = Dry contact

Error

CFG - Query Configuration

The CFG (Configuration) query returns the configuration of a single IO module.

Data

// Modular devices
> [F2]<ID>[F3]QIOXCFG[F4]<MODULE>[F5][F5]
// Standalone devices
> [F2]<ID>[F3]QIOXCFG[F4][F5][F5]

Reply

// Modular devices
< [F2]<ID>[F3]RIOXCFG[F4]<MODULE>:<ENABLED>:<REPORT_ON_CHANGE>:<REPORT_INTERVAL>[F5][F5]
// Standalone devices
< [F2]<ID>[F3]RIOXCFG[F4]<ENABLED>:<REPORT_ON_CHANGE>:<REPORT_INTERVAL>[F5][F5]

Example

// Query the configuration of Module 1 of a modular device on CFLink ID [04]
> [F2][04][F3]QIOXCFG[F4]M1[F5][F5]
// Reply
< [F2][04][F3]RIOXCFG[F4]M1:1:1:36000[F5][F5]
// IO module is enabled, report on change is enabled, reports status every hour.

Error

Configuration Messages

PRT - Configure Port Settings

The PRT (Port) command is used to configure the settings of all IO ports in one or more modules.
If some IO port configurations are to remain unchanged, simply omit them from the message.

Data

// Modular devices
> [F2]<ID>[F3]CIOXPRT[F4]<MODULE>|<PORT_CONFIG>[F5][F5]
// Standalone devices
> [F2]<ID>[F3]CIOXPRT[F4]<PORT_CONFIG>[F5][F5]

Reply

The changes take affect immediately. See the PRT Query Reply for more details.

Example

// Set IO ports for module 1 in a modular device on CFLink ID [05] as follows:
// Port 1 = Dry contact
// Port 2 = Dry contact
// Port 3 = Resistence, 1500 Ohm minimum change
// Port 4 = Voltage, 1.2 V minimum change
// Port 5 = External relay control, Power On State = Off
// Port 6 = LED ouput, Power On State = On
// Port 7 = Video Sense Input
// Port 8 = Dry contact
> [F2][05][F3]CIOXPRT[F4]M1|P01:D:0:0|P02:D:0:0|P03:R:15:0|P04:V:12:0|P05:E:0:0|P06:L:0:1|P07:S:0:0|P08:D:0:0[F5][F5]
// Reply
< [F2][05][F3]RIOXPRT[F4]M1|P01:D:0:0|P02:D:0:0|P03:R:15:0|P04:V:12:0|P05:E:0:0|P06:L:0:1|P07:D:0:0|P08:D:0:0[F5][F5]

Error

CFG - Configure Module

The CFG (Configure) command is used to configure the module settings.

Data

// Modular devices
> [F2]<ID>[F3]CIOXCFG[F4]<MODULE>:<ENABLED>:<REPORT_ON_CHANGE>:<REPORT_INTERVAL>[F5][F5]
// Standalone devices
> [F2]<ID>[F3]CIOXCFG[F4]<ENABLED>:<REPORT_ON_CHANGE>:<REPORT_INTERVAL>[F5][F5]

Reply

The changes take affect immediately. See the CFG Query Reply for more details.

Example

// Set module 1 in a modular device on CFLink ID [05] to be setup as follows:
// Data reading enabled, Report on change enabled, report on interval every minute.
> [F2][05][F3]CIOXCFG[F4]M1:1:1:00600[F5][F5]
// Reply
< [F2][05][F3]RIOXCFG[F4]M1:1:1:00600[F5][F5]

Error

Transmission Messages

SET - Set IO States

The SET command is used to set the state (on or off) of one or more IO ports across one or more modules.
The port must be configured to any of the following modes for SET to work.

If any other port mode is configured, the command will ignore that port.

Data

// Modular devices
> [F2]<ID>[F3]TIOXSET[F4]<MODULE>|<OUTPUTDATA>[F5][F5]
// Standalone devices
> [F2]<ID>[F3]TIOXSET[F4]<OUTPUTDATA>[F5][F5]

Reply

// Modular devices
< [F2]<ID>[F3]RIOXSTA[F4]<MODULE>|<IODATA>[F5][F5]
// Standalone devices
< [F2]<ID>[F3]RIOXSTA[F4]<IODATA>[F5][F5]

See the STA Query Reply for more details on the reply format.

Note that the reply data will contain relay data for every IO module in the modular base device.

Example

// Set ports 5 and 6 on in module 2.
// Modular base unit on CFLink ID [04].
> [F2][04][F3]TIOXSET[F4]M2|P05:1|P06:1[F5][F5]
// Reply
< [F2][04][F3]RIOXSTA[F4]M2|P01:D:0|P02:D:1|P03:R:010|P04:V:125|P05:E:1|P06:L:1|P07:D:0|P08:D:0[F5][F5]

Error

Notifications

STA - Status Notification

The STA (Status) notification returns the status of all IO ports in a single module.
The notification can be sent either on change or on interval, depending on how the IO Module is configured.

Data

// Modular devices
< [F2]<ID>[F3]RIOXSTA[F4]<MODULE>|<IODATA>[F5][F5]
// Standalone devices
< [F2]<ID>[F3]RIOXSTA[F4]<IODATA>[F5][F5]

Example

// Notification from IO module with 8 IO ports, in a MOD4 on CFLink ID [04]
< [F2][04][F3]RIOXSTA[F4]M2|P01:D:0|P02:D:1|P03:R:010|P04:V:125|P05:E:0|P06:L:1|P07:D:0|P08:D:0[F5][F5]
// Port 1 = Dry contact, Off
// Port 2 = Dry contact, On
// Port 3 = Resistence, 1000 Ohm reading
// Port 4 = Voltage, 12.5V reading
// Port 5 = External relay control, Off
// Port 6 = LED ouput, On
// Port 7 = Dry contact, Off
// Port 8 = Dry contact, Off

CHA - Change Notification

The CHA (Change) notification returns the status of only a single port that has changed state, from a single module.
The notification is only sent when the status changes more than the 'minimum change' property, depending on how the IO Module is configured.

Data

// Modular devices
< [F2]<ID>[F3]RIOXCHA[F4]<MODULE>|<IODATA>[F5][F5]
// Standalone devices
< [F2]<ID>[F3]RIOXCHA[F4]<IODATA>[F5][F5]

Example

// Notification from IO module when a port changes state, in a MOD4 on CFLink ID [04]
< [F2][04][F3]RIOXCHA[F4]M2|P02:D:1[F5][F5]
// Module = 2
// Port 2 = Dry contact, On