Command String

Command String blocks allow serial control of external devices via the Serial Control Port or the IP Network. Alternatively, if active third party control feedback is required please see the Subscriptions information in the TTP section.

When a control input node along the top of the block receives a HIGH logic signal (specifically, a LOW-to-HIGH logic transition), it will trigger a user-defined string to be transmitted from the unit’s serial port or network connection. Commands can also be initiated using the Send command button within the control dialog box.

Initialization Dialog

Network Command String

Serial Command String

Name Description
Command String Count Provides a dropdown where the number of channels can be selected. If Custom is selected from the drop-down list the number of channels between 1 and 32 can be specified.
Logic Output Count Provides dropdown where the number of Logic Outputs can be selected. If Custom is selected from the drop-down list the number of nodes between 0 and 32 can be specified.
Command Destination Can be either a serial port or Network (IP) port.
Equipment Type Specifies what type of hardware the Compiler should allocate the block to. Review the Equipment Type section for more details.

 

DSP Block Representation

Network Command String

Serial Command String

More information on logic is located here: Network_Command_String and  Serial_Command_String.

Control Dialog

Network Command String

 

Name Description
Input Relates to the corresponding logic Input.
Command ID The send button allows manual transmission of the command string.
Command String Shows the data that will be sent.
ID Number that relates to the corresponding Expected Response.
Expected Response User defined character string to be used in pattern matching.
Logic Output Allows a Logic Output node to be associated with an Expected Response. The Logic Output will momentarily pulse a logical HIGH ( for 250ms).
Edit
Allows editing of the respective Command String or Expected Response.
Move Up/Move Down Allows the Expected Response string order to be re-ordered as needed. This is important because the pattern matcher starts at the top of the list and works its way down looking for a complete match.

Connection Log

Displays character strings sent/received while connected to a live system.

Status LED

Shows Connection Status and Communication Activity.

Serial Command String

Name Description
Input Relates to the corresponding logic Input.
Command ID The send button allows manual transmission of the command string.
Command String Shows the data that will be sent.
Edit Opens the Edit Command String Dialog.

Edit Command String Button

The Edit Command String button applies to both the Serial Command String block and the Network Command String Block.

Selecting the Edit button will display the following dialog and allow the Command ID name and String to be defined.

Properties Sheets

The Property sheet of the Command string block is used to define the connection settings.

Network Command String Block Properties:

Name Description Range
Show Channel Displays information and settings specific to the selected channel.  
Allocated Unit Assigns the component (DSP block) to a particular unit in the system.  
Fixed in Unit Prevents the compiler from assigning the unit elsewhere. True or False
Instance Tag Allows a unique custom name to be used instead of the default Instance Tag.  
Instance ID    
Command ID The send button allows manual transmission of the command string.  
Command String Shows the character string that will be sent.  
Destination Identifies connection type as Network or Serial, defined at block initialization.  
Protocol Defines transport type as TCP or UDP. TCP or UDP
Server Address Target IP or hostname of the 3rd party network device the block will be communicating with.  
Local Port The local port, on Tesira, that will be used. This is for UDP only. 0 - 65,535
Remote Port The target port at the previously defined Server Address target IP that will be used. 0 - 65,535
Auto Connect Attempts to establish session communications automatically. Re-connection attempts will recur every 3 seconds as needed. True or False
Connection Sequence Intended for session negotiation sequence.  

 

The Connection Sequence is a list of strings that the Tesira Server monitors for a match and will return a response as defined in this list. For example, if a command string from third party device (sent to Tesira) matches any of the Connection Sequence items, the corresponding ‘Response’ string shall be sent back to the 3rd party control device.

Since the 3rd party control device can send a string of any length, with or without special characters and/or spaces and new lines, it can be difficult for an exact match to occur. Extra care should be taken when defining the values sent and what is expected to be received when configuring this list. Clicking the '...' button will display the Connection Sequence dialog where the Connection and Response values can be specified.

Serial Command String Properties:

 

 

 

Name Description Range
Show Channel Displays information and settings specific to the selected channel.  
Allocated Unit Assigns the component (DSP block) to a particular unit in the system.  
Fixed in Unit Prevents the compiler from assigning the unit elsewhere.  
Instance Tag Allows a unique custom name to be used instead of the default Instance Tag.  
Command ID The send button allows manual transmission of the command string.  
Command String Shows the character string that will be sent.  
Destination Identifies the connection type as Network or Serial as defined at block initialization.  
Serial Port Allows selection of available serial ports on the hardware device as available.  

The Serial Command String block will only transmit strings from serial port of the unit to which the block has been allocated. On a SERVER-IO and SERVER, it can be either of the ports depending on how they are configured. On TesiraFORTÉ, TesiraLUX and the EX-LOGIC there is only one serial port. The Property Sheet allows selection of which port is used.

Consider fixing the allocation of Command String blocks to prevent the block from being unexpectedly allocated to the wrong device.

The Baud rate for the serial port for the SERVER IO, SERVER, TesiraFORTÉ and TesiraLUX is configured in Device Maintenance under Serial_Port_Settings.

The Baud rate for the serial port for the EX-LOGIC is configured in Expander device maintenance in the EX_Logic_Serial_Device_Settings section.

Control Dialog Boxes for Command String components can be minimized to create user control surfaces (see Customizing Component Objects).

Response Pattern Matching

Character

Details

Example

ASCII

 

These are case sensitive and most commonly alphanumeric and human-readable characters.

Power_On

Escape Character

This is a character used to indicate that the following two characters will be hexadecimal digits.

~0A

?

A question mark (?) is a wildcard that will match any single printable character (including space but excluding carriage return, line feed or newline) in the input.

?

*

An asterisk (*) in the pattern matches zero or more printable characters (including space) in the input. The asterisk matches as few characters as are necessary to find a match in the input.

*

The block matches against each Response Pattern to receive input from the remote device. This includes previously received, but unmatched data remaining in the input buffer.

Both the order and content of the patterns are important. The following guidelines are recommended:

Device Indicators and Controls

Name Description

Response Commands

Indicates expected response.
  • Yellow - Receiving response
  • Green - Response received
  • Red - Response command receive error
  • Red - Response Command Receive Overflow (Fault will be logged in Event Logs).