LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert ASCII > Hex in LV 7.1 I/O Assistant " write " ?

I  try to command a periphal radio transmitter thru LV 7.1 I/O Assistant's  RS232 COM port ( no GPIB ).
The tranceiver can be controlled thru this same COM port properly while using a proprietary  control program  ( i.e. the COM port and the tranceiver are working OK ).
In MAX the COM port settings ( Bd rate / stopbits / parity / end  )  for Windows and VISA are OK and the COM port is properly recognized in MAX as well as in I/O Assistant.

I must control the tranceiver in Hex while the commands are in ASCII.
I tried 
0xcommand as well as &Hcommand but in vain.

Which ASCII > Hex tokens(s) should I use in I/O Assistant  ?
Stupid me, I can' sort out.....

Thanks.

0 Kudos
Message 1 of 4
(2,963 Views)

Have you tried using the Serial example: 

examples\instr\smplserl.llb\Basic Serial Write and Read.vi

Regards,

-Khalid

0 Kudos
Message 2 of 4
(2,954 Views)

at least you figured out to write text Smiley Wink

to your problem: VISA write has a string input. This string can be seen as an array of bytes (characters U8) (there are string to byte-array to string vis but if you don't need checksums you might not need them)

This string will be send out the serial port according to your serial settings.

You can set the display style of your string control or constant to different modes: normal/hex/'/'-style (see help) 

BTW: The forum is full of postings explaining and solving your problem ....

   

Message Edited by Henrik Volkers on 01-24-2006 09:34 AM

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 4
(2,945 Views)
Yep, this works.
Thanks ( Henrik as wel.. ).

Though, I don't understand why just the I/O Assistant.vi ( " write " ) can't do the job.

Peter.
0 Kudos
Message 4 of 4
(2,905 Views)