07-24-2009 06:11 AM
07-24-2009 06:13 AM
I am not getting what you want. Can you simply type what is the input you are going to give and what is your expected output?
07-24-2009 06:26 AM
07-24-2009 06:29 AM
07-24-2009 06:40 AM
OK, so what I see is that to get the device to see the number 100, you need to send it a string which appears as "64" if you are showing the string in hex display mode. Can I also assume that the number you send must be less than 128?
If so, you should convert your integer to U8 (or change the control to be of representation U8, then pass it to a "type cast" with the top input of type cast being a string (an empty string is fine)
The output of type cast is a string one byte long, which for an input value of 100 will show as 64 on a string indicator which is set to hex display mode. The byte in the string is the binary representation of 100, which is "64" in hex, or "d" in ASCII (string in normal mode) This is the string to pass to your device in the same way that you pass the constant string.
Remember that setting the display mode of a string does not change what the stored value (the 1's and 0's) is. It only changes how the value is presented on screen for your viewing. You could set the display mode to password and the screen image will be a line of stars. That doesn't mean that the value has chnged, but simply that you have told LabVIEW to show you the value in a different way.
Rod.
PS. Sorry, can't post files/images
07-24-2009 07:57 AM
Thanks Rod it works.
the number is less 128 but it works with I16.
I know that changing the display mode doesnt alters the stored value, but if the display mode is something else than hex my cam wont do anything.
For another command I need to get the value from a numeric control in a string indicator with hex display mode (same thing like before just without hex convertion)
thanks for help
Mark