Binary Code Viewer

The Binary Code Viewer offers you a quick way to program your host for exchanging messages with a Technosoft drive/motor. Through this tool, you can find how to encapsulate a TML command for all the communication types and the supported protocols. You get the both the contents of the messages you have to send and the expected answers from the drive/motor, if it is the case.

First select the communication Protocol between: serial RS 232, serial RS 485, CAN-bus with TMLCAN, CAN-bus with TechnoCAN or no protocol, just the binary code of the TML commands and answers.

At Sender select the Axis ID of the message sender. In the case of RS-232, the sender is always your Host, as 2 drives/motors may not be connected between them using RS-232. If you select RS-485, TMLCAN or TechnoCAN, the sender can be an Axis/Host (another Axis or your Host) or None. Option None, means non-requested messages sent by the drive/motor, containing a specific TML data. You can simulate these messages with a ?? query followed by the returned TML data name and by selecting None. If you select TML, you can find the binary code for TML commands sent from both the Host or another axis, which in the case of RS-232 plays the role of an Relay Axis (see Communication Protocols for details)

Remark: Though theoretically possible, activation of non-requested messages is not recommended for the RS-485 where the host must control the communication to avoid conflicts.

At Destination choose either an Axis of a Group of axes. In the first case, set the axis ID of the receiver. In the second case, select a group from 1 to 8 or set group number to 0 for a broadcast message.

In the case of query messages asking the drive/motor to return a TML data, you can introduce the returned value in hexadecimal format in the Type here (hexa) edit box. This helps you to quickly identify the position of the returned data in the message received.

You can simulate 2 types of query or Type B messages (see Communication Protocols for details):

A “GiveMeData: request, by typing at Source Code a question mark ? followed by a TML data name (for example ?apos to read the actual position). In this case the answer is a “TakeData” message
A “GiveMeData2” request, by typing at Source Code a double question mark ?? followed by a TML data name (for example ??aspd to read the actual speed). In this case the answer is a “TakeData2” message

On CAN-bus, a “GiveMeData2” request may be sent to a group of drives/motors. For the returned answer you can Select an axis from the group.

Remarks:

If a “GiveMeData2” request is sent to a group, the “TakeData2” answers are prioritized function of the respondents’ axis ID: the drive/motor with the lowest axis ID has the highest priority.
The “GiveMeData” request is intended only for a single axis. If in a CAN-bus network, “GiveMeData” is sent to a group, all the returned answers have the same CAN identifier and therefore can’t be differentiated, causing an error.
On RS-485, the query messages can’t be sent to group, as the answers will overlap.

For simulating Type A messages, which do not request to return a data, simply type the TML instruction at Source code. For example to set a position command CPOS of 2000 encoder counts, type cpos=2000.

 

After you have introduced one or more commands, press to arrow button “>” to generate the code.

 

At Binary code sent you’ll see the binary code (in hexadecimal format), which must be sent by your host. When RS-232 and RS-485 are selected, the code displayed represents the bytes you have to send via the serial asynchronous port of your host. When TMLCAN is used, the first 8 hexadecimal numbers represent the 29-bit identifier of the CAN message (the 3MSB of the 32-bit value are zero) and the remaining bytes represent, the CAN message data: byte 0, byte 1, etc. When TechnoCAN protocol is chosen, the first 3 hexadecimal numbers represents the 11-bit identifier of the CAN message (the MSB of the 12-bit value is zero).

At Binary code received you’ll see the answer sent by the drive/motor.

Remark: On RS-232 and RS-485 each message sent to one axis is confirmed with an acknowledge byte 4Fh. Therefore, in a query message, you’ll see first the 4Fh byte as confirmation for the reception of the data request, followed by the contents of the answer message. On RS-485, the 4Fh acknowledge byte is not sent if the command is sent to a group.  

 

See also:

Communication protocols