Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a property node of a menu ring to generate a secondary address does not work in a subvi unless the subvi has been or is opened. Why?

I am writing drivers for third party equipment using LabView 6.1. I am using the property node, digdisp.text, to get the item number of menu ring. This number is being used as the GPIB secondary address for the equipment. This vi is one many subVIs like it in a main vi.

The only way the main vi works consistently is if I open all the subVIs, otherwise the secondary address isn't picked up and I get a EARG and ENOL error in NISpy and a GPIB write error in the Error Out cluster.

I have attached an example of a NIspy capture of a failed attempt.
0 Kudos
Message 1 of 2
(2,732 Views)
Hi,
EARG (4)
Error Condition
: Invalid argument to a function call.
Description: EARG results when an invalid argument is passed to a function call.
Possible Cause: The following are some examples: you call ibtmo with a value not in the range 0 through 17 (possible timeout values correspond to a table of values ranging from 0 to 17, where the default is 13, which represents a 10 second timeout); you call ibeos with meaningless bits set in the high byte of the second parameter; or you call ibpad (or ibsad) with invalid addresses.

The reason you are getting the error is because not only is your secondary address invalid, but your primary address is also invalid. Lines 14 and 16 of your attached NI-SPY capture set
the primary address (ibpad) and secondary address (ibsad) respectively. You need to make sure that you are passing the addresses properly to the subVIs using a connector. It seems like your programming when sending and receiving data (like the addresses) from your subVIs is not correct. You have to be sure to pass the data back and forth in the proper method using connectors.

A.S.
Anu Saha
Academic Product Marketing Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,732 Views)