Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send numbers instead of text with NI-488?

Hi all,

  I  am using VISA to send data and command via GPIB to an external device. As I seen in online material about GPIB programming, all examples I found convert numbers to text (ASCII) format and send them as strings. So number 256 (1byte) is actually '256' (3bytes). It will increase the size of data being transferred and slow down the speed. I wonder if it is possible to send numbers in numbers (binary form). Sorry for any inaccurate infomation in my quesiton since I am just starting to learn using labview programming in VISA. Thanks.

0 Kudos
Message 1 of 4
(3,968 Views)

@phlins wrote:

Hi all,

  I  am using VISA to send data and command via GPIB to an external device. As I seen in online material about GPIB programming, all examples I found convert numbers to text (ASCII) format and send them as strings. So number 256 (1byte) is actually '256' (3bytes). It will increase the size of data being transferred and slow down the speed. I wonder if it is possible to send numbers in numbers (binary form). Sorry for any inaccurate infomation in my quesiton since I am just starting to learn using labview programming in VISA. Thanks.


Have you read the programming manual for this external device?

 

It doesn't matter what you are wondering about. You need to know what IS.

0 Kudos
Message 2 of 4
(3,957 Views)
Your question really has nothing to do with LabVIEW or VISA. It is GPIB fundamentals and that is what you should be studying as well as the manual.

To briefly answer, most data is sent as text except certain large data blocks for certain instruments (i.e. a scope).

If the speed of communication is that much og a concern, you chose the wrong bus.
0 Kudos
Message 3 of 4
(3,930 Views)

phlins wrote: I wonder if it is possible to send numbers in numbers (binary form).

It is.  In LabVIEW, you just use Type Cast to change to the binary form of a string.  However, as already stated, it really depends on your instrument.  I have only worked with 3 instruments that will send data back in a binary format (all of which were sending waveforms).

 

Also, in my experience the communication speed doesn't really matter that much anyways.  I end up waiting for the instrument to process the command and actually do something anyways.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,912 Views)