User Tools

Site Tools


Acknowledge Comands

In all our examples we used the ACK string (ACK in Hex:). If the attached device send this string as response, we know that the command was understood and executed (usually, some devices send two acknowledges, one if the command was valid and one when execution is finished). If the expected string is not received in the time determined by Timeout, a Timeout error occurs. But there are acknowledges that need to be processed further, e.g. the “CONFIGURATION” command of the SOLOIST player. This command supplies a list with the complete configuration of the machine. To show this list, a second command that does this job is needed.

First we implement the “ShowConfig” command as shown in the screenshot below:

The command has no parameter and the script is only the line ScriptResult = DP1 + “ CONFIGURATION” + Chr(13). Save the command and implement the command that handles the acknowledge (see below).

We named the acknowledge command “ACK_ShowConfig” and set its position to 78. The TabID stays empty, because we don't want the command to appear in any list. This make sense because this command only handles the acknowledge of the previously sent command “ShowConfig”. The script contains only one line, ShowMessage(IOResult). The variable IOResult is always present and from type string, so there is no need to declare the variable. IOResult always contain the result of the last sent command (in this case it is the string the Adtec player sends after receiving the CONFIGURATION command). The instruction ShowMessage shows the string in a window.

Now we have two commands, the “ShowConfig” and the “ACK_ShowConfig” command. The last step is to tell the “ShowConfig” command that there is a command that handles the acknowledge.

To do that, we need to modify the ACK Cmd field. Select “ACK_ShowConfig” here to tell the system that this command has to be executed after the “ShowConfig” command (see screenshot above).

acknowledge_commands.txt · Last modified: 2013/08/19 09:43 by admin