LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you write and array of hexidecimal commands to the visa write buffer

I would like to create an array of Hexidecimal values and write them to the serial drive. I've been using the visa write, but don't seem to be able to convert the array into an acceptable format.
 
Thanks
0 Kudos
Message 1 of 5
(4,046 Views)

The String>>Number\String Conversion palette has a VI which converts any numeric to a hex string. You can use that on your array inside a for loop with a Concatenate Strings VI to get your string.

The problem will probably be that you need to know the exact format that whatever it is on the other side of that connection expects.


___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(4,036 Views)

Hi,

  what are these hexidecimal commands? as in you have an array of unsigned 8 bit integers that you want to write out?

an array of U8 is the same as a character array, so you can simply take these numbers and send the character ASCII equivalent. (look on the strings subpalette for the strin/array/path conversion palette and then there's a couple of vi functions for u8 to string and strin to u8.

However, if your hexidecimal commands are meant to be sent as text, then the previous post by tst should sort you out.

i.e. if you have the values in decimal 65,66,67 that equates to 41,42,43 in Hex and  A, B, C in ascii.

if the commands are mean to be sent as the string 41,42,43 though, then as tst says

"

The String>>Number\String Conversion palette has a VI which converts any numeric to a hex string. You can use that on your array inside a for loop with a Concatenate Strings VI to get your string.

"

or another option would be to use the array to spreadsheet string (if you have to deliminate the hex values somehow, i.e. send "41,42,43")

Hope that helps

Thanks

Sacha Emery

National Instruments (UK)

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 3 of 5
(4,018 Views)

Hello,

I am very new to Labview.

Have a photon counting head H7467-01 whose commands are like

&H840000000 etc..

Could anybody please tell me if I can write this command "&H840000000"straight into the VISA Write

buffer?

Thanks..

0 Kudos
Message 4 of 5
(3,648 Views)