Low cost solutions to Data Acquisition & Control.
Data Sheets and Application Notes Product Warranty Return Policy How to Order Company Profile
 

 

Click for the BBB Business Review of this Computer Software Publishers & Developers in Fort Walton Beach FL  

Weeder Technologies
90-A Beal Pkwy NW
Fort Walton Beach FL 32548
850-863-5723
info@weedtech.com

Established: 1989
DUNS: 969723154
CAGE CODE: 4T5L9
 

How to transmit binary or hexadecimal data

There are a few of the Data Modules that are controlled by transmitting binary or hexadecimal data to it. Typing these commands directly into a "Transmit Command" function does not pose any problems however, since ModCom uses decimal numbers to represent the data in all of its Screen Objects it is not possible to use these Screen Objects as a variable in a transmit command string if the Data Module is expecting a binary or hexadecimal data format. To overcome this limitation, ModCom allows you to pass an argument at the end of the transmit command string telling it to strip off the numerical portion of the command string, convert it to BIN or HEX, then reattach it to the original header characters before transmitting. Thereby allowing the command string to contain a variable.

Binary and Hexadecimal Arguments

To convert the numerical field of a transmit command string to binary, include the argument /BINd at the end of the command string. To convert the numerical field of a transmit command string to hexadecimal, include the argument /HEXd at the end of the command string. The 'd' in the argument is the number of digits in the binary or hexadecimal number and is important because each Data Module requires a specific number of digits to be a valid command. Simply converting the numerical value to binary or hexadecimal will not surffice unless the number itself just happens to be the correct number of digits expected by the Data Module. The number 7 converted to binary is 111 but the WTSSR-M module for instance, will require the number 00111 to be valid. Using an argument of /BIN5 will pad the number with leading zeros to force it to be 5-digits long even though the actual number is less.

Transmit Command String Examples

Solid-State Relay Module: The WRITE command used by the WTSSR-M module is formatted in a 5-digit binary number. So to transmit a command string to this module using an Event Counter as a variable representing the numerical field, use the following string: AW{Counter1} /BIN5

Digital Output Module: The WRITE command used by the WTDOT-M module is formatted in an 8-digit binary number. So to transmit a command string to this module using an Event Counter as a variable representing the numerical field, use the following string: AW{Counter1} /BIN8

Digital I/O Module: The WRITE command used by the WTDIO-M module is a little different than the modules listed above because the user can specify how many I/O channels are affected by the command by choosing the number of digits in the WRITE command string. Transmitting the string AW{Counter1} /HEX1 will change the state of the first 4 channels A-D but leave the other channels unchanged. Transmitting the string AW{Counter1} /HEX2 will change the state of the first 8 channels A-H leaving the other channels unchanged, and so forth. Transmitting the string AW{Counter1} /HEX4 will change the state of all of the channels.