LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Read Error Misaligned

Solved!
Go to solution

Under Instrumeent I/O -> GPIB, there are read are write functions.  The error in and out for these fuctions do not line up.  Why is that?  

 

Should I even be using the GPIB functions?  Should I use the VISA fucnctions instead?  I like the GPIB functions, because I only need to input a GPIB address number in string for the address, and I think it is convenient.  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 5
(2,289 Views)
Solution
Accepted by topic author jyang72211

The use of the GPIB functions has not been recomended for quite a few years and certified instrument drivers require VISA. Using GPIB is, in my opinion, being short sighted. They tie you into NI hardware and tie you into GPIB. With VISA, you can use a GPIB controller from other vendors and you can easily use VISA with USB, Ethernet, RS-232, etc. with little or no code changes. As far as convenience, with the VISA Resource Control, you simply have to select the correct resource from the drop down - no need to try to remember addresses and you have support for aliases (i.e. 'DMM'). I also think having the VISA Resource Name Out makes for neater wiring.

Message 2 of 5
(2,286 Views)

If I use visa, is there a good way to convert a string into a visa resource name.  For example, how do I convert the string "com1" into its visa resource name equivalent?  How do I convert the string "3" (GPIB address 3) into its visa resource name equivalent?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 5
(2,270 Views)
A string can be directly wired. 'Comx' is a typical alias. You can use any string function you want for formatting the address.
Message 4 of 5
(2,266 Views)

Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 5 of 5
(2,245 Views)