Preview only show first 10 pages with watermark. For full document please download

Auxiliary Devices (an4632)

   EMBED


Share

Transcript

Auxiliary Devices Support Model Revision: CTM - 200 Rev 1.5 3066 Beta Avenue Burnaby, B.C. Phone: 604.294.4465 Fax: 604.294.4471 [email protected] V5G 4K4 Revision Control Revision Control Description Revision Date Changed /var/config/ directory to /var/data/ctm Updated minimum firmware revision Fixed examples Rev 1.5 22-Dec-15 Rev 1.4 4-Dec-15 Added cmd aux ack, cmd aux leadmode Rev 1.3 2-May-14 Added cmd aux rmleadterm Rev 1.2 14-Nov-2013 Added cmd aux repmode Modified cmd aux conf and payload format Customer Release Rev 1.1 6-Nov-2013 Rev 1.0 18-Oct-2013 © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 2 Contents 1 Contents Revision Control .............................................................................................................................................. 2 1 Contents .................................................................................................................................................. 3 2 Overview ................................................................................................................................................. 5 3 Polling Overview ..................................................................................................................................... 6 4 3.1 One polling command ..................................................................................................................... 6 3.2 Multiple polling commands ............................................................................................................ 6 3.3 Polling interval and timeouts .......................................................................................................... 7 Non-Polling Overview ............................................................................................................................. 8 4.1 4.1.1 Variable length messages ....................................................................................................... 8 4.1.2 Fixed length messages ............................................................................................................ 9 4.1.3 Leading characters are in body ............................................................................................... 9 4.2 Non-polling device with terminating characters .......................................................................... 10 4.2.1 Variable length messages ..................................................................................................... 10 4.2.2 Fixed length messages .......................................................................................................... 10 4.2.3 Terminating characters are in body ...................................................................................... 11 4.3 5 Non-polling device with leading characters.................................................................................... 8 Non-polling device with leading and terminating characters ....................................................... 11 4.3.1 Find earliest match................................................................................................................ 11 4.3.2 Find earliest match with minimum length ............................................................................ 12 Reporting Overview .............................................................................................................................. 13 5.1 Report Triggering .......................................................................................................................... 13 5.2 Report Format ............................................................................................................................... 14 5.2.1 Response Grouping ............................................................................................................... 16 5.2.2 Device Payload Format of Processed Data ........................................................................... 17 5.3 Parameter Lists ............................................................................................................................. 18 5.3.1 6 Parker Parameter List............................................................................................................ 18 Configuration Examples ........................................................................................................................ 19 6.1 Reporting data polled from auxiliary device ................................................................................. 19 6.1.1 Example of polling a generic device with one command at a fixed interval ........................ 19 6.1.2 Example of polling a generic device with a series of commands at a fixed interval............. 20 6.1.3 Bosch Rexroth polling at fixed interval ................................................................................. 20 6.1.4 Bosch Rexroth with multiple polling conditions ................................................................... 21 © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 3 Contents 6.2 7 8 Reporting data automatically sent by auxiliary device ................................................................. 22 6.2.1 Example of parsing data based on leading characters and fixed length .............................. 22 6.2.2 Parker with processed response and reporting at fixed interval and on parameter change23 6.2.3 Parker with processed response and only report parameters that are received ................. 23 6.2.4 Parker with processed response and only report parameters that changed ....................... 24 6.2.5 Parker with processed response and only report triggering parameters ............................. 24 6.2.6 Schmidt with sending an ACK message after a payload is received ..................................... 25 6.2.7 ACE Chlorobyte spreader with different leading characters ................................................ 25 Auxiliary Device Commands.................................................................................................................. 26 7.1 Command: aux mode m ................................................................................................................ 26 7.2 Command: aux repmode m .......................................................................................................... 26 7.3 Command: aux conf m mode ........................................................................................................ 26 7.4 Command: aux cond b t m mtype................................................................................................. 27 7.5 Command: aux len m .................................................................................................................... 28 7.6 Command: aux dev str .................................................................................................................. 28 7.7 Command: aux pollstr str .............................................................................................................. 28 7.8 Command: aux polltim i t tf .......................................................................................................... 29 7.9 Command: aux pollnow ................................................................................................................ 29 7.10 Command: aux lead c1 c2 c3 c4 c5 ............................................................................................... 30 7.11 Command: aux term c1 c2 c3 c4 c5 .............................................................................................. 30 7.12 Command: aux leadterm m .......................................................................................................... 30 7.13 Command: aux rmleadterm m ...................................................................................................... 31 7.14 Command: aux ack m c1 c2 c3 c4 c5 ............................................................................................. 31 7.15 Command: aux leadmode m ......................................................................................................... 31 Technical Support/Warranty: ............................................................................................................... 32 © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 4 Overview 2 Overview See link to the CTM200 command reference for more details on any commands: http://www.cypress.bc.ca/documents/Command_Ref/CTM200/ The Chameleon CTM-200 features the ability to poll and report data from up to three external auxiliary devices. With flexibility in configuring how data is polled and processed, a multitude of auxiliary devices are supported. In addition, there is already built-in support for Bosch Rexroth, Dickey John, and Parker salt spreaders. Up to three auxiliary devices are supported simultaneously, and each are configured the same way. For simplicity, this document assumes there is only one auxiliary device, connected to port 1. To use auxiliary devices on other ports, substitute cmd aux with cmd aux2 or cmd aux3 for ports 2 and 3 respectively. For example, if there are two auxiliary devices, one each on ports 1 and 3: cmd mode 24 0 23 cmd port 1 115200 8 n 1 0 cmd port 3 19200 8 n 1 0 cmd aux mode 1 cmd aux dev PRKR cmd aux cond 1 10 … cmd aux3 mode 5 cmd aux3 dev DJ1 cmd aux3 cond 1 30 … // port 1 is non-polling, port 3 is polling // serial port settings used by the Parker device // serial port settings used by the DJ device // send processed Parker data // auxiliary device ID // report every 10s // send processed Dickey John data // auxiliary device ID // report every 30s Note: CTM-200 firmware 2.0.5.4683 and later is required. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 5 Polling Overview 3 Polling Overview Some auxiliary devices need to be polled in order to retrieve the required information. To work with these devices, CTM is able to send one or more polling commands and send the auxiliary device’s response back via cmd mode 23: 3.1 One polling command If an auxiliary device needs to be sent a polling command in order to return a response, simply set cmd aux pollstr to that command. Note that it is up to the user to determine what timeout is appropriate and configure cmd aux polltim accordingly (see section 5.2.1.) For example, if the polling command is #123, the sent the polling command as follows: cmd aux pollstr “#123” 3.2 Multiple polling commands CTM also supports using a file of polling commands. This file must be named auxpollstr.txt and be located in /var/data/ctm/. Each time the CTM polls, it will send the entire content of the file to the auxiliary device. Therefore, it is also possible to contain only 1 command. The format of this file is as follows: [COMMAND1 TO BE SENT IN HEX][0x0A] [COMMAND2 TO BE SENT IN HEX][0x0A] … For example, if polling commands are #123 and #124, then the file would contain: 23313233 23313234 © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 6 Polling Overview If a space or tab is detected after a command, all characters from that point on are ignored until a new line (linefeed, 0x0A) is detected. So it is possible to put comments such as the following: 23313233 23313234 # this is polling command 1 # this is polling command 2 With the above file, each time CTM is triggered to poll with cmd aux pollnow or when timer has been reached with aux polltim, #123 and #124 will be sent. Once the file is copied to /var/data/ctm/auxpollstr.txt, it is advisable to run the following two commands: dos2unix /var/data/ctm/auxpollstr.txt After the file exists in /var/data/ctm/auxpollstr.txt, set the polling command to auxpollstr.txt: cmd aux pollstr auxpollstr.txt 3.3 Polling interval and timeouts The polling interval and timeouts are configured with cmd aux polltim. The first field sets the polling interval, which is how often a polling command or an entire list of commands in auxpollstr.txt is sent. If the timeout enforced flag is 0, then the timeout field determines how long the CTM will wait for the auxiliary device to respond after sending a polling command (or an individual polling command in auxpollstr.txt) before timing out. If timeout is reached, the next command in auxpollstr.txt is sent. If no commands are left to be sent, or auxpollstr.txt is not used, then this polling session is considered to be finished and the next poll is sent after the configured polling interval. If timeout is not reached but the amount of data returned by the auxiliary device is equal to or greater than the value set in cmd aux len, then the next command in auxpollstr.txt is sent. If no commands are left to be sent, or auxpollstr.txt is not used, then this polling session is also considered to be finished and the next poll is sent after the configured polling interval. The consequence is that if the timeout or cmd aux len is too small, then the CTM will quickly timeout and send the next command, thereby flooding the auxiliary device with commands. To prevent this, ensure that the timeout or cmd aux len (if using aux mode 0) is suitably large. It is also advisable to set the timeout enforced flag to 1. This ensures that even if the payload limit is reached (e.g. cmd aux len has been reached), the remaining time is still waited out before sending the next command. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 7 Non-Polling Overview 4 Non-Polling Overview Some auxiliary devices automatically send the required information, sometimes within a group of messages. Typically data is sent in a specific format so the information can be parsed properly. As such, it is possible to configure the CTM to look for a specific pattern and send that part as device payload. This helps reduce data use and processing on users’ side as CTM selectively chooses what data to forward. For non-polling mode, CTM uses cmd mode 24. The examples in this section are all based on the assumption that the example auxiliary device periodically sends out the following payload: 01 02 01 02 03 04 05 06 07 08 07 08 05 06 01 02 01 02 03 04 05 06 07 08 07 08 05 06 4.1 01 02… Non-polling device with leading characters This section is for non-polling devices that send out the same sequence of leading characters for each data of interest. A sequence of up to 5 characters is supported. 4.1.1 Variable length messages This part is for data of interest that is of variable length (up to 461 bytes.) CTM will look for data with the configured sequence of leading characters and send everything from, and including, the leading characters, up until the next set of leading characters (the next set’s leading characters are excluded.) Assume the sequence of leading characters in the data of interest is 01 02 03: cmd mode 24 cmd port 1 115200 8 n 1 0 cmd aux lead 01 02 03 cmd aux leadterm 1 cmd aux mode 0 cmd aux len 0 cmd aux dev AUXD cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 © 2015 Cypress Solutions // configure the first RS-232 port into non-polling mode // serial port settings used by the auxiliary device // set leading sequence to be 01 02 03 // set to use only leading characters // set to send raw spreader response as payload // variable response length // auxiliary device ID // send raw message as soon as data is received from device // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Auxiliary Devices Support Rev 1.5 8 Non-Polling Overview This will result in CTM sending 1 to 2 device payloads (2nd payload sent only if next message was sent from auxiliary device soon after): 01 02 03 04 05 06 07 08 07 08 05 06 01 02 4.1.2 01 02 03 04 05 06 07 08 07 08 05 06 01 02 Fixed length messages This example is for data of interest with a fixed length (up to 461 bytes.) In this example, the data of interest is within the 2 bytes after the 3 leading characters, so cmd aux len is set to 5 bytes to capture 3 bytes of leading characters and the subsequent 2 bytes of data. … cmd aux len 5 … // same as above // payload response is 5 bytes, including leading chars // same as above This will result in CTM sending these 2 device payloads per message from auxiliary device: 01 02 03 04 05 4.1.3 01 02 03 04 05 Leading characters are in body If the sequence of leading characters also exists in the body, then set cmd aux len to be the minimum length of the message, to ensure that those leading characters in the body are also included: … cmd aux len 18 … // same as above // payload response is 18 bytes, long enough to include leading chars in body // same as above The new cmd aux len will result in CTM sending this 1 device payload per message from auxiliary device: 01 02 03 04 05 06 07 08 07 08 05 06 01 02 01 02 03 04 © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 9 Non-Polling Overview 4.2 Non-polling device with terminating characters This section is for non-polling devices that send out the same sequence of terminating characters for each data of interest. A sequence of up to 5 characters is supported. 4.2.1 Variable length messages This part is for data of interest that is of variable length (up to 461 bytes.) CTM will look for data with the configured sequence of terminating characters and send everything from the beginning (or from the end of the previous set of terminating characters) up to and including, this set of terminating characters. Assume the sequence of terminating characters in the data of interest is 07 08: cmd mode 24 cmd port 1 115200 8 n 1 0 cmd aux term 07 08 cmd aux leadterm 2 cmd aux mode 0 cmd aux len 0 cmd aux dev AUXD cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 // configure the first RS-232 port into non-polling mode // serial port settings used by the auxiliary device // set terminating sequence to be 07 08 // set to use only terminating characters // set to send raw device response as device payload // variable response length // auxiliary device ID // send raw message as soon as data is received from device // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header This will result in CTM sending these 4 device payloads per message from auxiliary device: 01 02 01 02 03 04 05 06 07 08 4.2.2 07 08 05 06 01 02 01 02 03 04 05 06 07 08 07 08 Fixed length messages This example is for data of interest with a fixed length (up to 461 bytes.) This command also uses cmd aux len X. If X number of bytes have been received and the sequence of terminating characters found, CTM will send X bytes from the end of the terminating characters sequence towards the beginning. … cmd aux len 6 … // same as above // 6 bytes from the end of terminating characters // same as above This will result in CTM sending these 2 device payloads per message from auxiliary device: 03 04 05 06 07 08 © 2015 Cypress Solutions 03 04 05 06 07 08 Auxiliary Devices Support Rev 1.5 10 Non-Polling Overview 4.2.3 11 Terminating characters are in body If the sequence of terminating characters also exists in the body, then set cmd aux len to be the minimum length of the message, to ensure that those terminating characters in the body are also included: … cmd aux len 12 … // same as above // payload response is 12 bytes, long enough to include terminating chars in body // same as above The new cmd aux len value will result in CTM sending these 2 device payloads per message from device: 01 02 01 02 03 04 05 06 07 08 07 08 4.3 01 02 01 02 03 04 05 06 07 08 07 08 Non-polling device with leading and terminating characters This section is for non-polling devices that send out the same sequence of leading and terminating characters for each data of interest. A sequence of up to 5 characters for each part is supported. This is very useful for finding a specific pattern (e.g. subset of a message) within a message payload. 4.3.1 Find earliest match This example will find the earliest match of a sequence that starts with the configured sequence of leading characters and ends with the configured sequence of terminating characters. cmd mode 24 cmd port 1 115200 8 n 1 0 cmd aux lead 01 02 cmd aux term 07 08 cmd aux leadterm 3 cmd aux mode 0 cmd aux len 0 cmd aux dev AUXD cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 // configure the first RS-232 port into non-polling mode // serial port settings used by the auxiliary device // set leading sequence to be 01 02 // set terminating sequence to be 07 08 // set to use both leading and terminating characters // set to send raw device response as device payload // variable response length // auxiliary device ID // send raw message as soon as data is received from device // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header This will result in the CTM sending these 2 device payloads per message from auxiliary device: 01 02 01 02 03 04 05 06 07 08 © 2015 Cypress Solutions 01 02 01 02 03 04 05 06 07 08 Auxiliary Devices Support Rev 1.5 Non-Polling Overview 4.3.2 Find earliest match with minimum length If cmd aux len is non zero, then the earliest match must be of at least the configured length: … cmd aux len 11 … // same as above // pattern is at least 11 bytes long // same as above This will result in the CTM sending these 2 device payloads per message from auxiliary device: 01 02 01 02 03 04 05 06 07 08 07 08 © 2015 Cypress Solutions 01 02 01 02 03 04 05 06 07 08 07 08 Auxiliary Devices Support Rev 1.5 12 Reporting Overview 5 Reporting Overview 5.1 Report Triggering For reports to be sent, cmd aux conf must be non 0 (see section 5.2.2) and cmd aux cond must be enabled. The following tables describe the report triggering behaviour based on cmd aux cond b t m mtype. The bitmap of the mask (m) depends on cmd aux mode and are listed in section 5.3. For example, if CTM is to trigger on parameters 1 and 3, then m is P1 added with P3, so bits 1 and 3 are set and added together (start counting from bit 0.) This means m=10b+1000b=1010b=0x0Ah. If cmd aux mode 0: Ena(b)le 0 1/2 (T)imeout (Seconds) X X (M)ask X X (M)ask (Type) X X Description Description Disable reporting, cmd sendreport (i.e. 1220,1221,1222) has no effect Report when raw data is received, cmd sendreport has no effect If cmd aux mode is non 0: Ena(b)le (M)ask 0 (T)imeout (Seconds) X X (M)ask (Type) X 1/2 0 0 0 1/2 0 0 1 1 0 M 0 1 0 M 1 2 0 X 0 2 0 X 1 1/2 T 0 0 1/2 T 0 1 1 T M 0 1 T M 1 2 T M 0 2 T M 1 Disable reporting, but cmd sendreport 1220 (or 1221, 1222 for aux2 and aux3 respectively) will still trigger a report Report when parameters received, updated param mask list parameters received since last report Report when parameters received, updated param mask list parameters changed since last report Report if parameters received since last report is in M, updated param mask list parameters received since last report Report if parameters that have changed since last report is in M, updated param mask list parameters changed since last report Report when any parameters received, updated param mask list parameters received since last report Report when any parameters received, updated param mask list parameters changed since last report Send report every T seconds, updated param mask list parameters received since last report Send report every T seconds, updated param mask list parameters changed since last report Send report every T seconds AND if parameters received since last report is in M, param mask list parameters received since last report Send report every T seconds AND if parameters that have changed since last report is in M, param mask list parameters changed since last report Send report every T seconds OR if parameters received since last report is in M, param mask list parameters received since last report Send report every T seconds OR if parameters that have changed since last report is in M, param mask list parameters changed since last report Note: cmd sendreport 122X can manually trigger a report when aux mode is non 0, even if aux cond is 0. Auxiliary devices on port 1 uses report 1220, port 2 uses report 1221, port 3 uses 1222. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 13 Reporting Overview 5.2 14 Report Format The report generated from the CTM can contain either an ASCII header, or a binary header, and is determined by aux repmode. For backwards compatibility, ASCII headers are used by default. However, users should ensure that aux mode is 0 and the auxiliary device provides ASCII data. If aux mode is non 0, then the auxiliary device data appended will still be in binary, disrupting the ASCII message. If an ASCII header is used (aux repmode 0), messages are sent from the CTM in the following format: $PGPS,hhmmss.ss,v,llll.llll,a,yyyyy.yyyy,b,ccc.c,ddd.d,ddmmyy,seeeee,ff,ggggggggggggggg,[DATA]*hh Header Field hhmmss.ss v llll.llll a yyyyy.yyyy b ccc.c ddd.d ddmmyy s eeeee ff ggggggggggggggg Description UTC time in hours, minutes, seconds, and decimal seconds Validity flag: A = valid current data, B = valid stored data, V = invalid current data, W = invalid stored data Position latitude in degrees, minutes and decimal minutes N = North, or S = South Position longitude in degrees and decimal degrees E = East, or W = West Horizontal velocity in knots Heading in degrees (relative to true north) Day, month and year Sign + or - for altitude above or below mean sea level Altitude in metres Number of satellites in use (range of 0 to 12) Modem ID (padded with zeroes at the beginning if < 15 characters) The data portion of the message is composed of: [DATA]: [DEVICE NAME],[CONT FLAG],[DEVICE PAYLOAD] Data Field [DEVICE NAME] [CONT FLAG] [DEVICE PAYLOAD] Description Auxiliary Device ID, up to 4 characters (Default: AUX1) Continued flag: ‘0’=if next payload is not part of this one; ‘1’=if next payload is part of this one Up to 400 characters An example of a complete message is as follows: $PGPS,000230.00,V,0000.0000,N,00000.0000,E,000.0,000.0,060180,+00000,0,012698000144078,AUX2,0,Data Coming From Auxiliary Device *78 Note how whitespace and linefeed and carriage returns are also included in the message (checksum is the XOR of all characters between $ and *.) So in the example above, all ASCII characters will yield a checksum of 0x7F, and 0x7F XOR 0x0D XOR 0x0AD = 0x78. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 Reporting Overview If a binary header is used (aux repmode 1), messages are sent from the CTM in the following format: [HEADER][DEVICE INFO][DEVICE PAYLOAD] The 8 byte [HEADER] is: 0xFF 0xSS 0x06 0x00 0x00 0xNN 0x00 0x00 Where SS is an incrementing sequence number byte and NN is the number of bytes in [DEVICE INFO] and [DEVICE PAYLOAD] combined. The [DEVICE INFO] is composed of the following: Data Field 4 bytes 4 bytes 2 bytes 2 bytes 1 byte 1 byte 1 byte 1 byte 2 bytes 2 bytes 4 bytes 1 byte 1 byte (0x00) 1 byte (0x00) 1 byte (0x00) 1 to 15 bytes 1 byte (0x2C) 1 to 4 bytes 1 byte (0x2C) 1 byte Description Normalized latitude (RMC latitude x 100,000) Normalized longitude (RMC longitude x 100,000) Speed in knots Heading GPS data validity: ‘A’=valid; ‘V’=invalid Number of satellites used for position fix Position type Digital input state (0=off, 1=on): bit 0 = input #1, bit 1 = input #2…bit 5 = input #6, bit 6 = RF switch box output mode (1 = RF off, 0 = RF on), bit 7 = ignition status Altitude in meters Differential correction age (only valid if differential correction being used) Time (based on number of seconds since 00:00:00 January 1, 1970) Digital output state (0=off, 1=on): bit 0 = output #1, bit 1 = output #2, bit 2 = output #3, bit 3 = output #4, bit 4 … bit 7 = Not used Not used Event source: None Event reason: None Modem ID: ASCII string ‘,’ Delimiter Auxiliary Device ID: ASCII string (Default: AUX1) ‘,’ Delimiter Continued flag: 0x00=if next payload is not part of this one; 0x01=if next payload is part of this one [DEVICE PAYLOAD] is between 0 and 461 bytes, and is data from the auxiliary device. If no data is returned from the auxiliary device and aux mode is 0, [DEVICE PAYLOAD] is 0 bytes. If aux mode is not 0, then device payload depends on cmd aux conf. If aux conf M 0, then all parameters are included when a message is sent; if aux conf M 1, then only updated parameters that are also in M are included; if aux conf M 2, then only updated parameters that triggered the report and are also in M are appended. To indicate whether a device is not reporting any values at all (e.g. it is OFF), set aux conf M 1 or aux conf M2 and if no parameters are received, [DEVICE PAYLOAD] will be 0 bytes. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 15 Reporting Overview If data from the auxiliary device is greater than 461 bytes, then the data is split over multiple messages. Please refer to section 5.2.1 for more detail. An example of a complete message showing [HEADER][DEVICE INFO][DEVICE PAYLOAD] is as follows (refer to the previous table for the colour coding scheme for [DEVICE INFO]): 0xFF 0x00 0x30 0x01 0x19 0x37 0x55 0x73 5.2.1 0x18 0x00 0x39 0x02 0x20 0x38 0x56 0x74 0x06 0x41 0x31 0x03 0x21 0x39 0x57 0x75 0x00 0x0B 0x31 0x04 0x22 0x40 0x58 0x76 0x00 0x01 0x32 0x05 0x23 0x41 0x59 0x77 0x85 0x80 0x38 0x06 0x24 0x42 0x60 0x78 0x00 0x1D 0x36 0x07 0x25 0x43 0x61 0x79 0x00 0x00 0x37 0x08 0x26 0x44 0x62 0x80 0xF3 0x00 0x35 0x09 0x27 0x45 0x63 0x81 0x28 0x00 0x32 0x10 0x28 0x46 0x64 0x82 0x4B 0xDF 0x34 0x11 0x29 0x47 0x65 0x83 0x00 0xBD 0x2C 0x12 0x30 0x48 0x66 0x84 0x76 0x6E 0x34 0x13 0x31 0x49 0x67 0x85 0x52 0x51 0x34 0x14 0x32 0x50 0x68 0x86 0x44 0x00 0x30 0x15 0x33 0x51 0x69 0x87 0xFF 0x00 0x2C 0x16 0x34 0x52 0x70 0x00 0x00 0x00 0x17 0x35 0x53 0x71 0x00 0x00 0x00 0x18 0x36 0x54 0x72 Response Grouping Responses greater than 461 bytes are split over several messages, with as many messages as necessary generated. These sets of messages form one response group, where the payload of all messages except for the last one are 461 bytes long, with the last one containing the remaining data (must be 461 bytes or less.) As well, in one response group, all messages except for the last one will have a continued flag of 1, with the last message having a continued flag of 0. For example, if 600 bytes of data is to be reported, then 2 messages are sent: Message 1: [HEADER, SS=SEQ NUM][DEVICE INFO, Cont’d flag=0x01][461 BYTES DEVICE PAYLOAD] Message 2: [HEADER, SS=SEQ NUM+1][DEVICE INFO, Cont’d flag=0x00][139 BYTES DEVICE PAYLOAD] Response grouping is determined by the following:  aux mode non 0: Each response group contains 1 to 32 parameters, depending on cmd aux conf. So using default settings, each response group contains an entire list of parameters.  aux mode 0: A new response group is generated when timeout is reached, or payload length is reached before timing out and timeout enforced flag is 0. So if too many undesired response groups are generated, increase the timeout and/or set timeout enforced flag to 1 in cmd aux polltim, or increase payload length in cmd aux len. In raw, non-processing mode (aux mode 0), aux len will either set the minimum or maximum payload size, depending on the cmd mode used. Also, depending on if timeout is reached or if timeout enforced flag is set, messages may be put together in the same response group or separate groups. It is also possible to increase aux len to a maximum of 500. While this will have no effect on message length (i.e. still restricted at a maximum of 461 bytes per message), more messages will be grouped together in the same response group. Again, this also depends on if timeout is reached or if timeout enforced flag is set. If aux mode is non 0, aux len should not be configured as it is used internally and has no effect on response grouping. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 16 Reporting Overview 5.2.2 Device Payload Format of Processed Data CTM supports customized processing of specific spreader controllers (cmd aux mode greater than 0.) Currently, Parker and Dickey-John controllers are supported. With customized processing, users are able to configure which parameters to include in the report generated by the CTM. To help with determining which parameters are sent, the device payload includes additional information: [DEVICE PAYLOAD]: [PARAMETER APPENDED MASK][UPDATED PARAMETER MASK][PROCESSED DEVICE PAYLOAD] The [PARAMETER APPENDED MASK] is a 4 byte bitmapped value showing which parameters are appended. [UPDATED PARAMETER MASK] marks which parameters were received or which parameters’ value has changed since the last report, depending on the mask type parameter in cmd aux cond. The [PROCESSED DEVICE PAYLOAD] is N bytes, depending on cmd aux conf and the type of the auxiliary device being used. If the entire device payload is missing, then data is no longer received by the CTM. Each aux mode has a fixed parameter list with fixed P# parameter ordering and fixed size for each P# parameter. This means P2 for aux mode 1 might be 1 byte while P2 for aux mode 5 might be 2 bytes. This provides flexibility in allowing users to generate user defined messages with only a couple of commands. Note: Additional parameters may be appended in the future, but pre-existing ones will never be changed for backwards compatibility (i.e. size and ordering will always be constant.) Each list can have up to a total of 32 parameters (P0 to P31.) Suppose there is an auxiliary device providing data that CTM parses into the following list of parameters: P# 0 1 2 3 4 5 6 Size (Bytes) 5 1 1 4 8 4 1 Type String Unsigned Char Unsigned Char Float Double Float Unsigned Char Description Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5 Parameter 6 Parameter 7 If the user wants all parameters to be sent, then cmd aux conf FFFFFFFF is used and the payload will be: [DEVICE PAYLOAD]: 0x00 0x00 0x00 0x7F 0x00 0x00 0x00 0xEF [P0] [P0] [P0] [P0] [P0] [P1] [P2] [P3] [P3] [P3] [P3] [P4] [P4] [P4] [P4] [P4] [P4] [P4] [P4] [P5] [P5] [P5] [P5] [P6] If only parameters P0, P2, P4, P5, and P6 are desired, then set cmd aux conf 75 and the payload will be: [DEVICE PAYLOAD]: 0x00 0x00 0x00 0x75 0x00 0x00 0x00 0xEF [P0] [P0] [P0] [P0] [P0] [P2] [P4] [P4] [P4] [P4] [P4] [P4] [P4] [P4] [P5] [P5] [P5] [P5] [P6] © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 17 Reporting Overview Note: Requested parameters are appended in the payload, in increasing P# order. Note: Updated parameter mask is showing 0xEF because parameters not configured to be reported were also detected to be sent by the auxiliary device. Suppose only P0 and P4 are reported and still using cmd aux conf 75, parameters not reported are set to 0x00: [DEVICE PAYLOAD]: 0x00 0x00 0x00 0x75 0x00 0x00 0x00 0x11 [P0] [P0] [P0] [P0] [P0] 0x00 [P4] [P4] [P4] [P4] [P4] [P4] [P4] [P4] 0x00 0x00 0x00 0x00 0x00 If users only wish to have updated parameters or parameters whose values changed to be sent (depending on mask type in aux cond), set mode in cmd aux conf to 1, i.e. cmd aux conf 75 1: [DEVICE PAYLOAD]: 0x00 0x00 0x00 0x11 0x00 0x00 0x00 0x11 [P0] [P0] [P0] [P0] [P0] [P4] [P4] [P4] [P4] [P4] [P4] [P4] [P4] With this format, as long as users are aware of the size and ordering of all parameters (i.e. which aux mode is used), users should be able to use the configured parameter mask field to determine how to parse the payload. 5.3 Parameter Lists This section contains parameter lists that report triggering and report formatting uses. 5.3.1 Parker Parameter List If cmd aux mode 1 is set, the parameter list is as follows: P# 0 1 2 3 4 5 6 7 8 9 10 11 Size (Bytes) 1 (bitmap:11CCPPBB) 1 1 1 (bitmap: 1111DDDD) 2, MSB first 2, MSB first 2, MSB first 2, MSB first 1 1 1 1 © 2015 Cypress Solutions Type Unsigned Char Unsigned Char Unsigned Char Unsigned Char Unsigned Short Unsigned Short Unsigned Short Unsigned Short Unsigned Char Unsigned Char Unsigned Char Unsigned Char Description CC - controller, PP - pause, BB - blast Ambient Air temp Road surface temp DDDD - Dry material type Dry Material Application Rate Dry Material Accumulated Total Wet Material Application Rate Wet Material Accumulated Total Ambient Temperature Input (C) Road Temperature Input (C) Ambient Temperature Input (F) Road Temperature Input (F) Auxiliary Devices Support Rev 1.5 18 Configuration Examples 19 6 Configuration Examples This section is intended to provide examples of commonly used configurations. While auxiliary devices commands are listed in later sections, a complete list of commands can be found online at http://www.cypress.bc.ca/command_reference.html. Note: All configuration examples must end with a cmd save and cmd pwr mode 2 to take effect. 6.1 6.1.1 Reporting data polled from auxiliary device Example of polling a generic device with one command at a fixed interval This example configures the CTM to poll the auxiliary device with ASCII string #123 every 30s and send the raw device response to a remote server IP/port. The device always responds with data of up to 100 bytes, so length is capped at 100 bytes. Because this spreader is a generic device (i.e. specific support not built into firmware yet), cmd aux mode 0 is used to send the raw data. cmd mode 23 cmd port 1 115200 8 n 1 0 cmd aux mode 0 cmd aux pollstr “#123” cmd aux dev AUXD cmd aux len 100 cmd aux polltim 30 300 0 cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 © 2015 Cypress Solutions // configure the first RS-232 port into polling mode // serial port settings used by the auxiliary device // set to send raw spreader response as payload, sets aux len 0, aux repmode 0 // set polling string to be #123 // auxiliary device ID // maximum response length of 100 // poll every 30s, 3s polling timeout // send raw message as soon as data is received from device // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Auxiliary Devices Support Rev 1.5 Configuration Examples 6.1.2 interval Example of polling a generic device with a series of commands at a fixed This example configures the CTM to poll the auxiliary device with commands stored in the polling file /var/data/ctm/auxpollstr.txt. Please see section 3.2 for more information on using the polling file. cmd mode 23 cmd port 1 115200 8 n 1 0 cmd aux mode 0 cmd aux pollstr auxpollstr.txt cmd aux dev AUXD cmd aux len 100 cmd aux polltim 30 300 0 cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 6.1.3 // configure the first RS-232 port into polling mode // serial port settings used by the auxiliary device // set to send raw spreader response as payload, aux len 0, aux repmode 0 // set polling string to be #123 // auxiliary device ID // maximum response length of 100 // poll every 30s, 3s polling timeout // send raw message as soon as data is received from device // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Bosch Rexroth polling at fixed interval This example is a variation of the example of polling a generic device with one command. It will configure the CTM to poll the Bosch Rexroth CS-440 with the ASCII string @1 every 10s and send the raw spreader controller response to a remote server IP/port. The length is set to 88 because the response from the spreader controller is fixed at 88. A timeout of 4s has been set and deemed usable for this spreader. Notice that timeout is not enforced as there is only one polling command to be sent, so the spreader would not be flooded by a series of commands. cmd mode 23 cmd port 1 115200 8 n 1 0 cmd aux mode 0 cmd aux pollstr @1 cmd aux dev 440 cmd aux len 88 cmd aux polltim 10 400 0 cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 © 2015 Cypress Solutions // configure the first RS-232 port into polling mode // serial port settings used by the CS-440 // set to send raw spreader response as payload, aux len 0, aux repmode 0 // polling string // auxiliary device ID // number of bytes CS-440 sends per response // poll every 10s, 4s polling timeout // send raw message as soon as data is received from spreader // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Auxiliary Devices Support Rev 1.5 20 Configuration Examples 6.1.4 21 Bosch Rexroth with multiple polling conditions This example will configure the CTM to poll the Bosch Rexroth CS-440 with the ASCII string @1 and send the raw spreader controller response to a remote server IP/port. The polling string is sent every 15s or when the heading has changed by 15 degrees. Because there are multiple triggering conditions (time and heading), a report triggered script is used to manually send the polling command. Step 1: Add the following into a file named report 1020.sh (1020 corresponds to GPS report #1): #!/bin/sh cmd aux pollnow exit Step 2: Save the file in /etc/reports/scripts on the CTM and run the following two commands in CTM’s console: dos2unix /etc/reports/scripts/report1020.sh chmod +x /etc/reports/scripts/report1020.sh Step 3: Enter the following configuration: cmd mode 23 cmd port 1 115200 8 n 1 0 cmd aux mode 0 cmd aux pollstr @1 cmd aux dev 440 cmd aux len 88 cmd aux polltim 0 400 0 cmd gpscond 1 2 15 0 0 0 15 1 cmd reportscripts 1 cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 // configure the first RS-232 port into polling mode // serial port settings used by the CS-440 // set to send raw spreader response as payload, sets aux len 0, aux repmode 0 // polling string // auxiliary device ID // number of bytes CS-440 sends per response // 4s polling timeout // trigger GPS report 1 every 15 seconds or when heading changes 15 degrees // enable report triggered scripts // send raw message as soon as data is received from spreader // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Step 4: Run cmd save to save the configuration changes and the script. Next, power cycle the CTM with cmd pwr mode 2 (note that after CTM reboots, you will lose the console because the 1st serial port is now configured for use with the CS-440 controller.) © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 Configuration Examples 6.2 6.2.1 Reporting data automatically sent by auxiliary device Example of parsing data based on leading characters and fixed length If the message of interest always starts with a certain set of characters, it is possible to configure the CTM to look for these characters to find that specific message. Note: Up to 5 leading characters are supported. In this example, the data of interest starts with 0x01 0x02 0x03. The data length is 15 bytes long, including the 3 leading characters. This configuration will allow the CTM to locate the data and send this data packet in a report. It will be up to the user to actually process the data. cmd mode 24 cmd port 1 19200 8 n 1 0 cmd aux lead 01 02 03 cmd aux leadterm 1 cmd aux len 15 cmd aux conf FFFFFFFF cmd aux mode 0 cmd aux repmode 1 cmd aux dev AUXD cmd aux cond 1 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 © 2015 Cypress Solutions // configure the first RS-232 port into non-polling mode // serial port settings used by the auxiliary device // set leading characters to look for to 01 02 03 // set to use only leading characters // length of data, including leading chars // set to report all data // set to send raw data, sets aux len 0, aux repmode 0 // set to use binary header // auxiliary device ID // send raw message when received // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Auxiliary Devices Support Rev 1.5 22 Configuration Examples 23 6.2.2 Parker with processed response and reporting at fixed interval and on parameter change This is a variation of the previous example, as the Parker device also automatically send data (starting with 01 05 02) and are always 22 bytes long. Below configures CTM to report all of the Parker data on the list that corresponds with aux mode 1 (see section 5.3.1), as well as when P0 (bit 0, so a mask of 0x1, please see section 5.1) has changed. P0 is the parameter that contains controller, pause, and blast values. cmd mode 24 cmd port 1 115200 8 n 1 0 cmd aux mode 1 cmd aux conf FFFFFFFF cmd aux dev PKR1 cmd aux cond 2 10 1 1 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 6.2.3 // configure the first RS-232 port into non-polling mode // serial port settings used by the Parker device // send processed Parker data, sets aux lead 01 05 02, leadterm 1, len 22, repmode 1 // set to report all data // auxiliary device ID // send every 10s or when P0 (0x1) has changed // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Parker with processed response and only report parameters that are received This is another variation of the previous example, but instead of reporting all parameters, only updated (received) parameters are reported. This example also uses Parker data in the list that corresponds with aux mode 1 (see section 5.3.1). cmd mode 24 cmd port 1 115200 8 n 1 0 cmd aux mode 1 cmd aux conf FFFFFFFF 1 cmd aux dev PKR1 cmd aux cond 1 0 FFFFFFFF 0 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 // configure the first RS-232 port into non-polling mode // serial port settings used by the Parker device // send processed Parker data, sets aux lead 01 05 02, leadterm 1, len 22, repmode 1 // set to allow reporting of only updated/changed data // auxiliary device ID // send when any parameter has been updated // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header If only triggering on specific parameters that are received while still sending all available updated data: … cmd aux cond 1 0 5 0 … © 2015 Cypress Solutions // same as above // send when either P2 or P0 (road temp and controller/pause/blast) are updated // same as above Auxiliary Devices Support Rev 1.5 Configuration Examples 6.2.4 24 Parker with processed response and only report parameters that changed This is another variation of the previous example, but instead of reporting updated parameters, only parameters whose values have changed are reported. This example also uses Parker data in the list that corresponds with aux mode 1 (see section 5.3.1). cmd mode 24 cmd port 1 115200 8 n 1 0 cmd aux mode 1 cmd aux conf FFFFFFFF 1 cmd aux dev PKR1 cmd aux cond 1 0 FFFFFFFF 1 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 // configure the first RS-232 port into non-polling mode // serial port settings used by the Parker device // send processed Parker data, sets aux lead 01 05 02, leadterm 1, len 22, repmode 1 // set to allow reporting of only updated/changed data // auxiliary device ID // send when any parameter has changed in value // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header If only triggering on specific parameters that have changed while still sending all available changed data: … cmd aux cond 1 0 5 1 … 6.2.5 // same as above // send when either P2 or P0 (road temp and controller/pause/blast) has changed // same as above Parker with processed response and only report triggering parameters This example will configure CTM to report any of the Parker data in the list that corresponds with aux mode 1 (see section 5.3.1) that have triggered a report. cmd mode 24 cmd port 1 115200 8 n 1 0 cmd aux mode 1 cmd aux conf 5 1 cmd aux dev PKR1 cmd aux cond 1 0 5 0 or cmd aux cond 1 0 5 1 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 © 2015 Cypress Solutions // configure the first RS-232 port into non-polling mode // serial port settings used by the Parker device // send processed Parker data, sets aux lead 01 05 02, leadterm 1, len 22, repmode 1 // set to only allow reporting P2 and P0 // auxiliary device ID // send when either P2 or P0 (road temp and controller/pause/blast) has updated // send when either P2 or P0 (road temp and controller/pause/blast) has changed // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Auxiliary Devices Support Rev 1.5 Configuration Examples 6.2.6 Schmidt with sending an ACK message after a payload is received Schmidt controllers require an ACK (0x06) to be sent after each payload in order to allow it to send the next payload. Each payload received starts with SOH (0x01) and ends with EOT (0x04), so they will be used to find each payload. cmd mode 24 cmd aux lead 01 cmd aux term 04 cmd aux leadterm 3 cmd aux ack 1 06 cmd aux mode 0 cmd aux dev AUXD cmd aux cond 1 0 cmd aux repmode 1 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 6.2.7 // configure the first RS-232 port into non-polling mode // set leading characters to look for to 01 // set terminating characters to look for to 04 // set to use both leading and terminating characters // enable ACK and send 0x06 as the ACK sequence // set to send raw data, sets aux len 0, aux repmode 0 // auxiliary device ID // send raw message when received // set to use binary header // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header ACE Chlorobyte spreader with different leading characters For ACE Chlorobyte controllers, there are several different possible starting characters (0x11, 0x12, or 0x13) in a payload. This example shows how the leading sequence matching can be modified into matching any of the characters in the leading character sequence. cmd mode 24 cmd aux lead 11 12 13 cmd aux leadterm 1 cmd aux leadmode 0 cmd aux mode 0 cmd aux len 21 cmd aux dev AUXD cmd aux cond 1 0 cmd aux repmode 1 cmd aux report 1 cmd repremip 1 x.x.x.x cmd repremport 1 xxxx cmd reptype 1 0 4 1 © 2015 Cypress Solutions // configure the first RS-232 port into non-polling mode // set leading characters to look for to 0x11 0x12 0x13 // set to use only leading characters // set to match any leading characters (‘OR’ condition) // set to send raw data, sets aux len 0, aux repmode 0 // set the length to 21 bytes // auxiliary device ID // send raw message when received // set to use binary header // configure auxiliary report to use general report number 1 // send response to IP x.x.x.x // send response to port xxxx // send spreader reports using UDP with a ULCP header Auxiliary Devices Support Rev 1.5 25 Auxiliary Device Commands 7 Auxiliary Device Commands 7.1 Command: aux mode m aux mode [m] m 0 1 2 3 4 5 Description Processing auxiliary device payload DISABLED (use raw data) (DEFAULT) Also sets aux len 0, aux repmode 0. Process auxiliary device payload for Parker Also sets aux lead 01 05 02, aux leadterm 1, aux len 22, aux repmode 1 Reserved Reserved Reserved Process auxiliary device payload for Dickey-John Also sets aux pollstr auxpollstr.txt, aux len 500, aux repmode 1 This sets whether or not to process auxiliary device’s response data or to pass on the data as raw data. If data is to be processed, they are done according to the lists in section 5.3. 7.2 Command: aux repmode m aux repmode [m] m 0 1 Description Use ASCII header (message 114) (DEFAULT) Use binary ULCP header (message 112) This sets whether data is appended to an ASCII message header or binary message header. 7.3 Command: aux conf m mode aux conf [m] [mode] m 0 1-FFFFFFFF Description Disable reporting auxiliary device data Report auxiliary device data (DEFAULT FFFFFFFF) mode 0 1 Description Send all parameters configured to be reported (DEFAULT) Send only updated parameters (cmd aux cond X X X 0) or parameters whose values changed (cmd aux cond X X X 1) This bitmapped value sets whether or not to auxiliary device’s response data is reported when auxiliary device reporting is enabled (cmd aux cond 1/2). The parameter bitmap mask corresponds to the lists of parameters in section 5.3. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 26 Auxiliary Device Commands 7.4 Command: aux cond b t m mtype aux cond [b t] [m mtype] This command configures the how auxiliary reports are triggered and sent. It is possible to send reports as soon as data is received, when data has changed, at a periodic interval, or a combination of all these. Please refer to section 5.1 for more information. If cmd aux mode 0: Ena(b)le 0 1 2 (T)imeout (Seconds) X X X (M)ask X X X (M)ask (Type) X X X Description Description Report when parameters received, param mask list parameters received since last report Report when parameters received, param mask list parameters changed since last report Report if parameters received since last report is in M, param mask list parameters received since last report Report if parameters that have changed since last report is in M, param mask list parameters changed since last report Report when any parameters received, param mask list parameters received since last report Report when any parameters received, param mask list parameters changed since last report Send report every T seconds, param mask list parameters received since last report Send report every T seconds, param mask list parameters changed since last report Send report every T seconds AND if parameters received since last report is in M, param mask list parameters received since last report Send report every T seconds AND if parameters that have changed since last report is in M, param mask list parameters changed since last report Send report every T seconds OR if parameters received since last report is in M, param mask list parameters received since last report Send report every T seconds OR if parameters that have changed since last report is in M, param mask list parameters changed since last report Disable reporting Report when raw data is received Report when raw data is received If cmd aux mode is non 0: Ena(b)le (M)ask 0 (T)imeout (Seconds) X X (M)ask (Type) X 1/2 0 0 0 1/2 0 0 1 1 0 M 0 1 0 M 1 2 0 X 0 2 0 X 1 1/2 T 0 0 1/2 T 0 1 1 T M 0 1 T M 1 2 T M 0 2 T M 1 © 2015 Cypress Solutions Disable reporting Auxiliary Devices Support Rev 1.5 27 Auxiliary Device Commands 7.5 Command: aux len m aux len [m] m 0 to 500 Description Function depends on cmd aux mode and cmd mode (DEFAULT 205) cmd aux mode 0 and cmd mode 23: Sets the maximum device payload size in each message. This can be used to restrict message size. cmd aux mode 0 and cmd mode 24: Sets the device payload size or minimum device payload size in each message. Please see section 4 for more information. cmd aux mode not 0: Used internally to configure expected response length from external device. Do not use this command when cmd aux mode is not 0. 7.6 Command: aux dev str aux dev [str] str Up to 4 chars Description Device ID to be sent in response message (DEFAULT AUX1) Sets the device ID that is sent in the response message by CTM (please see section 5.2 for more information.) It should ideally reflect the auxiliary device attached to the CTM. 7.7 Command: aux pollstr str aux pollstr [str] str Up to 20 chars auxpollstr.txt Description Polling string (DEFAULT BLANK) Use polling commands stored in /var/data/ctm/auxpollstr.txt Note: Used with cmd mode 23. This command sets the polling string that is sent when cmd aux pollnow is executed or polling time in cmd aux polltim has elapsed. If a file of commands is to be used, ensure the file is copied to /var/data/ctm/auxpollstr.txt before setting cmd aux pollstr auxpollstr.txt. See section 3.2 for more information. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 28 Auxiliary Device Commands 7.8 Command: aux polltim i t tf aux polltim [i] [t] [tf] i 0 1-65535 Description Automated polling disabled, but cmd aux pollnow still functions (DEFAULT) Polling interval in seconds. When polling interval expires, the command in aux pollstr is sent, or the entire auxpollstr.txt is sent. t 0-30000 Description Polling timeout for when aux pollstr or each command in auxpollstr.txt is sent. In units of 10ms. tf 0 Description Timeout not enforced. Allows polling commands to be sent as soon as CTM receives cmd aux len number of bytes. (DEFAULT) Timeout enforced, forcing CTM to wait out the entire polling timeout, even if CTM has already received cmd aux len number of bytes. This can be used to prevent flooding auxiliary device with commands. 1 Note: Used with cmd mode 23. This command configures how often CTM sends a polling command. The polling interval works independently of cmd aux pollnow, so that manually polling with cmd aux pollnow will not reset the timer. The timeout parameter determines how long CTM will wait for a response after sending a polling command, or each individual command in auxpollstr.txt, before sending the next command in auxpollstr.txt. Users should ensure the timeout is long enough if the auxiliary device has a latency in its response. If timeout enforced flag is 0, then as soon as the number of bytes received by the CTM from the auxiliary device matches the value in cmd aux len, the next polling command is sent. If necessary, set the timeout enforced flag to 1 to force CTM to wait out the rest of the timeout before sending the next polling command to prevent flooding the auxiliary device with commands. 7.9 Command: aux pollnow aux pollnow Note: Used with cmd mode 23. Initiates one polling session (i.e. send the polling command configured in cmd aux pollstr, or the entire list of commands in auxpollstr.txt.) © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 29 Auxiliary Device Commands 7.10 Command: aux lead c1 c2 c3 c4 c5 aux lead [c1] [c2] [c3] [c4] [c5] c1 to c5 0x00 to 0xFF Description Characters of a leading sequence to match Note: Used with cmd mode 24. This sets the leading sequence to search for. A sequence of up to 5 bytes is supported. Please see section 4 for more information. 7.11 Command: aux term c1 c2 c3 c4 c5 aux term [c1] [c2] [c3] [c4] [c5] c1 to c5 0x00 to 0xFF Description Characters of a leading sequence to match Note: Used with cmd mode 24. This sets the terminating sequence to search for. A sequence of up to 5 bytes is supported. Please see section 4 for more information. 7.12 Command: aux leadterm m aux leadterm [m] m 0 1 2 3 Description Disabled, do not look for leading or terminating characters (DEFAULT) Look for leading characters Look for terminating characters Look for both leading and terminating characters Note: Used with cmd mode 24. This controls whether to look for leading or terminating characters. Please see section 4 for more information. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 30 Auxiliary Device Commands 7.13 Command: aux rmleadterm m aux rmleadterm [m] m 0 1 2 3 Description Disabled, do not remove leading or terminating characters (DEFAULT) Remove leading characters Remove terminating characters Remove both leading and terminating characters Note: Used with cmd mode 24. This controls whether to remove leading or terminating characters from payload. Please see section 4 for more information. 7.14 Command: aux ack m c1 c2 c3 c4 c5 aux ack [m] [c1] [c2] [c3] [c4] [c5] m 0 1 Description Disable sending ACK sequence (DEFAULT) Enable sending ACK sequence c1 to c5 0x00 to 0xFF Description Characters of an ACK sequence Note: Used with cmd mode 24. This sets the ACK sequence that is sent after a payload has been received. 7.15 Command: aux leadmode m aux leadmode [m] m 0 1 Description Match any one character in set Match entire character sequence (DEFAULT) Note: Used with cmd mode 24. This controls whether leading characters is found when any one character in the set is found, or the entire sequence must be matched. © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 31 Technical Support/Warranty: 8 Technical Support/Warranty: Cypress Solutions Service Support Group 1.877.985.2878 or 604.294.4465 9.00am to 5.00pm PST [email protected] © 2015 Cypress Solutions Auxiliary Devices Support Rev 1.5 32