07-24-2009 04:12 AM
I have to send hexadecimal commands to a sony evi-d100 cam. The command must be a hex string. But the cam accept only commands which are displayed in hex.
This works great with constant strings. But for my project I need to transmitt also variable strings. I can convert these variable values to a hex string but thy arent shown correctly in a hex display. e.g. I have the value 100 (decimal) convert it into hex is 64. But the value shown in the string hex display is always 3634. And this isnt accepted by my cam it should be 64 .
But why does it works with string constants?
Thanks for help
Mark
Solved! Go to Solution.
07-24-2009 04:20 AM
07-24-2009 04:26 AM
07-24-2009 04:29 AM
Hello Mark, there is no big difference between constant strings and string controls. If it works with constants, it must also work with controls.
You wrote: "The command must be a hex string". As I understand it, the correct command string shown in Normal Display should look as the correct hex value (ex: "64").
If you later change the display to Hex Display, you will see the hex representation of the "6" character (36) and of the "4" character (34). Hence what you saw in the control. If the camera doesn't accept it, probably the correct command string is NOT a hex string (in the way I understood it).
Hope this helps.
07-24-2009 04:46 AM
Another question.
In your constant strings - the ones that do work - have you selected them to be in NORMAL display mode or HEX display mode. By that I am meaning to right click on the constant, and say whether normal or hex has the tick.
Rod.
07-24-2009 05:50 AM
07-24-2009 05:54 AM
Ohh yes you are right, the correct command string is not a hex string, but a string with hex display. The input is a numeric variable .The numeric variable must be converted to hex and then the value shown in a string with hex display. If I take a string constant as input it works great. If I take the numeric variable e.g. 30; 30 should be shown in the strin with hex display, but there is 3330.
In the attachement is an example of my problem.
07-24-2009 05:56 AM
07-24-2009 06:01 AM
07-24-2009 06:08 AM
sorry I mixed something up. The output for the cam command is not a hex string but a normal string with hex display mode.
Thanks for help.
Mark