assurance-tunnel
assurance-tunnel
assurance-tunnel
assurance-tunnel

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

    Screenshot 1

    Screenshot 2

    Screenshot 3



  • @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



  • @mark

    That was!

    Thanks Mark


  • Tech Staff

    This stuff is tricky... I could use a workshop on this.


  • Tech Staff

    @dusx

    Same


 

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.