CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


hardware:cflink:input-output-io-module-cflink-protocol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

hardware:cflink:input-output-io-module-cflink-protocol [2012/08/23 05:16]
aaron
hardware:cflink:input-output-io-module-cflink-protocol [2013/03/26 05:34] (current)
jarrod [PRT - Configure Port Settings]
Line 1: Line 1:
-====== Input/​Output (IO) Module ​CFLink Protocol ======+====== Input/​Output (IO) CFLink Protocol ======
  
-The following documentation describes the CFLink protocol for modular ​IO devices.+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 ===== ===== Common Definitions =====
Line 13: Line 14:
     * ''​R''​ = ''​R''​esistance reading input, <​STATE>​ = ''​000''​-''​100''​ (0 to 10,000 Ohms in 100 Ohm increments)     * ''​R''​ = ''​R''​esistance reading input, <​STATE>​ = ''​000''​-''​100''​ (0 to 10,000 Ohms in 100 Ohm increments)
     * ''​A''​ = ''​A''​nalog Voltage reading input, <​STATE>​ = ''​000''​-''​100''​ (00.0 to 10.0 Volts DC in 0.1 Volt increments)     * ''​A''​ = ''​A''​nalog Voltage reading input, <​STATE>​ = ''​000''​-''​100''​ (00.0 to 10.0 Volts DC in 0.1 Volt increments)
-    * ''​V''​ = Digital ​Voltage ​reading input, <​STATE>​ = ''​0''​ for voltage below threshold, ''​1''​ for voltage equal to or above threshold +    * ''​V''​ = Digital ​''​V''​oltage ​reading input, <​STATE>​ = ''​0''​ for voltage below threshold, ''​1''​ for voltage equal to or above threshold 
-    * ''​S''​ = Video Sensing ​input, <​STATE>​ = ''​0''​ for no video sensed, ''​1''​ for video sensed. +    * ''​S''​ = Video ''​S''​ensing ​input, <​STATE>​ = ''​0''​ for no video sensed, ''​1''​ for video sensed. 
-    * ''​E''​ = External ​relay control output, 0-24V DC (external power supply required), <​STATE>​ = ''​0''​ for OFF, ''​1''​ for ON. +    * ''​E''​ = ''​E''​xternal ​relay control output, 0-24V DC (external power supply required), <​STATE>​ = ''​0''​ for OFF, ''​1''​ for ON. 
-    * ''​L''​ = LED output (1mA), <​STATE>​ = ''​0''​ for OFF, ''​1''​ for ON.+    * ''​L''​ = ''​L''​ED ​output (5V DC, 1mA), <​STATE>​ = ''​0''​ for OFF, ''​1''​ for ON.
  
 ===== Queries ===== ===== Queries =====
Line 26: Line 27:
 === Data === === Data ===
 <sxh cflink; light: true> <sxh cflink; light: true>
 +// Modular devices
 > [F2]<​ID>​[F3]QIOXSTA[F4]<​MODULE>​[F5][F5] > [F2]<​ID>​[F3]QIOXSTA[F4]<​MODULE>​[F5][F5]
 +// Standalone devices 
 +> [F2]<​ID>​[F3]QIOXSTA[F4][F5][F5]
 </​sxh>​ </​sxh>​
   * **<​MODULE>​** = The module number to request the status of. 2 chars, uppercase '​M'​ followed by the module number.   * **<​MODULE>​** = The module number to request the status of. 2 chars, uppercase '​M'​ followed by the module number.
Line 36: Line 38:
  
 <sxh cflink; light: true> <sxh cflink; light: true>
 +// Modular devices
 < [F2]<​ID>​[F3]RIOXSTA[F4]<​MODULE>​|<​IODATA>​[F5][F5] < [F2]<​ID>​[F3]RIOXSTA[F4]<​MODULE>​|<​IODATA>​[F5][F5]
 +// Standalone devices
 +< [F2]<​ID>​[F3]RIOXSTA[F4]<​IODATA>​[F5][F5]
 </​sxh>​ </​sxh>​
  
Line 70: Line 75:
  
 <sxh cflink; light: true> <sxh cflink; light: true>
 +// Modular devices
 > [F2]<​ID>​[F3]QIOXPRT[F4]<​MODULE>​[F5][F5] > [F2]<​ID>​[F3]QIOXPRT[F4]<​MODULE>​[F5][F5]
 +// Standalone devices 
 +> [F2]<​ID>​[F3]QIOXPRT[F4][F5][F5]
 </​sxh>​ </​sxh>​
  
Line 80: Line 87:
  
 <sxh cflink; light: true> <sxh cflink; light: true>
 +// Modular devices
 < [F2]<​ID>​[F3]RIOXPRT[F4]<​MODULE>​|<​PORT_CONFIG>​[F5][F5] < [F2]<​ID>​[F3]RIOXPRT[F4]<​MODULE>​|<​PORT_CONFIG>​[F5][F5]
 +// Standalone devices 
 +< [F2]<​ID>​[F3]RIOXPRT[F4]<​PORT_CONFIG>​[F5][F5]
 </​sxh>​ </​sxh>​
  
Line 121: Line 130:
  
 <sxh cflink; light: true> <sxh cflink; light: true>
 +// Modular devices
 > [F2]<​ID>​[F3]QIOXCFG[F4]<​MODULE>​[F5][F5] > [F2]<​ID>​[F3]QIOXCFG[F4]<​MODULE>​[F5][F5]
 +// Standalone devices 
 +> [F2]<​ID>​[F3]QIOXCFG[F4][F5][F5]
 </​sxh>​ </​sxh>​
   * **<​MODULE>​** = The module number to request the module configuration of. 2 chars, uppercase '​M'​ followed by the module number.   * **<​MODULE>​** = The module number to request the module configuration of. 2 chars, uppercase '​M'​ followed by the module number.
Line 130: Line 141:
  
 <sxh cflink; light: true> <sxh cflink; light: true>
 +// Modular devices
 < [F2]<​ID>​[F3]RIOXCFG[F4]<​MODULE>:<​ENABLED>:<​REPORT_ON_CHANGE>:<​REPORT_INTERVAL>​[F5][F5] < [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]
 </​sxh>​ </​sxh>​
  
Line 155: Line 168:
 < [F2][04][F3]RIOXCFG[F4]M1:​1:​1:​36000[F5][F5] < [F2][04][F3]RIOXCFG[F4]M1:​1:​1:​36000[F5][F5]
 // IO module is enabled, report on change is enabled, reports status every hour. // IO module is enabled, report on change is enabled, reports status every hour.
- 
 </​sxh> ​ </​sxh> ​
  
Line 172: Line 184:
  
 <sxh cflink; light: true> <sxh cflink; light: true>
 +// Modular devices
 > [F2]<​ID>​[F3]CIOXPRT[F4]<​MODULE>​|<​PORT_CONFIG>​[F5][F5] > [F2]<​ID>​[F3]CIOXPRT[F4]<​MODULE>​|<​PORT_CONFIG>​[F5][F5]
 +// Standalone devices 
 +> [F2]<​ID>​[F3]CIOXPRT[F4]<​PORT_CONFIG>​[F5][F5]
 </​sxh>​ </​sxh>​
   * **<​PORT_CONFIG>​** = See the definition under the ''​PRT''​ Query for more details.   * **<​PORT_CONFIG>​** = See the definition under the ''​PRT''​ Query for more details.
Line 179: Line 193:
 === Reply === === Reply ===
  
-The changes take affect immediately. See the ''​PRT'' ​[[:#​prt-query-port-settings|Query Reply]] for more details.+The changes take affect immediately. See the ''​PRT''​ Query Reply for more details.
  
 === Example === === Example ===
Line 191: Line 205:
 // Port 5 = External relay control, Power On State = Off // Port 5 = External relay control, Power On State = Off
 // Port 6 = LED ouput, Power On State = On // Port 6 = LED ouput, Power On State = On
-// Port 7 = Dry contact+// Port 7 = Video Sense Input
 // Port 8 = Dry contact // 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:​D:​0:​0|P08:​D:​0:​0[F5][F5]+> [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 // 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] < [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]
 +</​sxh>​
 +
 +=== Error ===
 +
 +  * 003 = Invalid Port Number
 +  * 004 = Invalid Module Number
 +  * 425 = Invalid IO Port Mode
 +  * 426 = Invalid IO Port Minimum Change
 +  * 427 = Invalid IO Port Power On State
 +
 +==== CFG - Configure Module ====
 +
 +The ''​CFG''​ (Configure) command is used to configure the module settings.
 +
 +=== Data ===
 +
 +<sxh cflink; light: true>
 +// 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]
 +</​sxh>​
 +
 +  * See the definition under the ''​CFG''​ Query for more details.
 +
 +=== Reply ===
 +
 +The changes take affect immediately. See the ''​CFG''​ Query Reply for more details.
 +
 +=== Example ===
 +
 +<sxh cflink; light: true>
 +// 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]
 +</​sxh>​
 +
 +=== Error ===
 +
 +  * 004 = Invalid Module Number
 +  * 429 = Invalid IO Reporting Interval
 +
 +===== 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.
 +
 +  * ''​E''​ = External relay control
 +  * ''​L''​ = LED output
 +If any other port mode is configured, the command will ignore that port.
 +
 +=== Data ===
 +
 +<sxh cflink; light: true>
 +// Modular devices
 +> [F2]<​ID>​[F3]TIOXSET[F4]<​MODULE>​|<​OUTPUTDATA>​[F5][F5]
 +// Standalone devices
 +> [F2]<​ID>​[F3]TIOXSET[F4]<​OUTPUTDATA>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​MODULE>​** = The module number to change the state of. 2 chars, uppercase '​M'​ followed by the module number.
 +    * eg. ''​M1''​ = Module 1, ''​M4''​ = Module 4.
 +  * **<​OUTPUTDATA>​** = For each IO port in the module, the port status is written in ''​P##:<​STATE>''​ format.
 +    * **<​STATE>​** = Single char:
 +      * ''​0''​ = Output off
 +      * ''​1''​ = Output on
 +      * ''​T''​ = Toggle Output
 +
 +=== Reply ===
 +
 +<sxh cflink; light: true>
 +// Modular devices
 +< [F2]<​ID>​[F3]RIOXSTA[F4]<​MODULE>​|<​IODATA>​[F5][F5]
 +// Standalone devices
 +< [F2]<​ID>​[F3]RIOXSTA[F4]<​IODATA>​[F5][F5]
 +</​sxh>​
 +
 +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 ===
 +
 +<sxh cflink; light: true>
 +// 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]
 +
 +</​sxh>​
 +
 +=== Error ===
 +
 +  * 003 = Invalid Port Number
 +  * 004 = Invalid Module Nsdumber
 +  * 428 = Invalid IO State
 +
 +===== 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 ===
 +
 +<sxh cflink; light: true>
 +// Modular devices
 +< [F2]<​ID>​[F3]RIOXSTA[F4]<​MODULE>​|<​IODATA>​[F5][F5]
 +// Standalone devices
 +< [F2]<​ID>​[F3]RIOXSTA[F4]<​IODATA>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​IODATA>​** = For each IO port in the module, the port status is returned in ''​P##:<​MODE>:<​STATE>''​ format.
 +  * **<​MODE>​** = Single uppercase char. Refer to Common Definitions - Port Modes for more information on the possible modes and states.
 +
 +=== Example ===
 +
 +<sxh cflink; light: true>
 +// 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
 +</​sxh>​
 +
 +==== 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 ===
 +
 +<sxh cflink; light: true>
 +// Modular devices
 +< [F2]<​ID>​[F3]RIOXCHA[F4]<​MODULE>​|<​IODATA>​[F5][F5]
 +// Standalone devices
 +< [F2]<​ID>​[F3]RIOXCHA[F4]<​IODATA>​[F5][F5]
 +</​sxh>​
 +
 +  * **<​IODATA>​** = The port status is returned in ''​P##:<​MODE>:<​STATE>''​ format.
 +  * **<​MODE>​** = Single uppercase char. Refer to Common Definitions - Port Modes for more information on the possible modes and states.
 +
 +=== Example ===
 +
 +<sxh cflink; light: true>
 +// 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
 </​sxh>​ </​sxh>​
hardware/cflink/input-output-io-module-cflink-protocol.1345698999.txt.gz · Last modified: 2012/08/23 05:16 by aaron