TCP Send Data format
-
Hi,
I am controlling a PTZ camera from Isadora, using the TCP Send Data actor. The purpose is to recall different presets assigned a number. Then I send a hexadecimal string (81 01 04 3F 02 PP FF) where PP is the preset number. In order to pass different variables through the actor I use the format P1: 2X (81 01 04 3F 02 P1: 2X FF). However, when I pass values through the param input, its hexadecimal value is not displayed correctly. I have tried with the example of the manual and the result does not correspond.
I guess I'm passing the data wrong, in an incorrect format.
Any help...
Thanks -
@jandraka said:
I guess I'm passing the data wrong, in an incorrect format.
Yes, but it's easy to make this mistake. From the documentation of the "X" parameter:
Output the ASCII representation of the number as n hexadecimal digits.
(Bold and underline here for emphasis.) If you feed it a value 65 decimal (hex 41), the actor will output two hexadecimal bytes, hex 34 and hex 31 which are the ASCII codes for the numbers '4' and '1'.
You want to use "C" instead of "X". That will output a single byte based on the parameter value.
Best Wishes,
Mark -
-
This stuff is tricky... I could use a workshop on this.
-
Same