Please enable JavaScript to view this site.

XStudio Recorder

Navigation: Reference > Task Reference

Send Control Command Task

Scroll Prev Top Next More

The Send Control Command task is used to send a string of data to an external device for purposes of controlling the device or causing it to take some action. The data string can be sent as pure text or as binary information. This is a send-data-only task; any information returned by the device is ignored.

When creating a new Send Control Command task, the dialog is initially displayed similar to the example shown here, with its default property settings.

Send Control Command Properties

Items with a check mark in the REQ column require user entry, while unchecked items have default values which can optionally be changed.

Property

REQ

Description

Task Name

The user-friendly name of the task. See Common Properties for more information.

Command String

The characters, including optional control codes, that are to be sent to the external device.

Send Text As-Is

 

If this property is checked, the data sent will be exactly as displayed in the Command String field. Control codes are represented as "<xxx>" in the Command String field, if inserted, and are normally interpreted to their binary value (Decimal 0..31) when the command string is sent. As an example, if the "ACK" value (Decimal 6) needs to be sent, it is represented in the Command String as "<ACK>" and at send time, the decimal byte value 6 is sent. If this property is checked, what will be sent instead is "<ACK>" as plain text, which is 5 bytes, ie, the displayed text of the Command String with no interpretation.

Append <CR>

 

When this property is checked (the default), a Carriage Return (Decimal 13, Hex 0D) is appended to the Command String when sent to the external device.

Append <LF>

 

When this property is checked, a Line Feed (Decimal 10, Hex OA) is appended to the Command String when sent to the external device.

When both Append <CR> and Append <LF> are checked, they are appended to the Command String in conventional order - Carriage Return followed by Line Feed. If you need to reverse this order, use the [Insert Control Code] button to insert them manually directly into the Command String and uncheck both of these properties.

Inserting Control Codes in the Command String

Control codes are defined as Decimal values 0 through 31 and as the name implies, are traditionally used for special "control" characteristics of a device receiving the Command String. Control codes might be used to mark the beginning or end of a command sequence, for instance.

Control codes can be placed anywhere in the Command String field, either by correctly typing the control code representation or using a pop-up control code selection dialog. Place the cursor in the position in the Command String field where you want to insert a control code and click on the [Insert Control Code] button.

Control code insertion dialog

Control code insertion dialog

Select the control code you wish to place in the Command String and click on the [Insert] button. The control code representation will be inserted at the cursor position.

Send Command Examples

When you have finished setting the Send External Command properties, the displayed information will appear similar to the examples shown here, with the command string previewed in either Hex or Control Code mode. Click on the [Apply] button to save your changes.

Command String preview in Hex

Command String preview in Hex

Command String preview in Control Codes

Command String preview in Control Codes


 Common Task Properties