Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB and VISA Problem

What session should I close? The MAX or something else?

0 Kudos
Message 11 of 21
(1,739 Views)

Any other session you might have open. Windows only allows a single application at a time to access a com port.

0 Kudos
Message 12 of 21
(1,734 Views)

Hi,

 

You VISA example has no viClose, so I guess that's the one you need to close.

 

 

Regards
Ray Farmer
0 Kudos
Message 13 of 21
(1,710 Views)

I have closed all other sessions and the problem still occur.  THe program with VISA write and read is fine.  However, the program with GPIB write and read still have the same problem.

0 Kudos
Message 14 of 21
(1,684 Views)

I tried to initial GPIB and I wrote the program in the attachment.  

Error was shown in the attahcment

Download All
0 Kudos
Message 15 of 21
(1,680 Views)

Hi

 

Try using a SendIFC after your Write and Read functions

 

 

Regards
Ray Farmer
0 Kudos
Message 16 of 21
(1,671 Views)

I found out what the problem is.  My computer configure my GPIB controller as GPIB1 but not GPIB0.  Therefore, the GPIB address input to the GPIB write should be 1:17  instead of 17.  When I input 1:17 to the GPIB address, the probelm was solved.

 

However, why the computer configure te GPIB controller as GPIB1 but not GPIB0 as I only have 1 GPIB controller?

0 Kudos
Message 17 of 21
(1,630 Views)

hi,

 

if you had used GPIB::17::INSTR then it would not have mattered.

 

It might be because its a USB device and when you connect to a different USB socket it treated as a new device.

 

 

Regards
Ray Farmer
0 Kudos
Message 18 of 21
(1,604 Views)

Hi,

 

Is it OK for enter GPIB::17::INSTR as the address of the GPIB write?

 

Thanks and Regards

0 Kudos
Message 19 of 21
(1,580 Views)

Hi,

 

no you only pass the value to GPIB write.vi,  i.e. 17

 

  address string contains the address of the GPIB device with which the function communicates. You can input both the primary and secondary addresses in address string by using the form primary+secondary. Both primary and secondary are decimal values, so if primary is 2 and secondary is 3, address string is 2+3.

If you do not specify an address, the functions do not perform addressing before they attempt to read and write the string. They assume you have either sent these commands another way or that another controller is in charge and therefore responsible for the addressing. If the controller is supposed to address the device but does not do so before the time limit expires, the functions terminate with GPIB error 6 (timeout) and set bit 14 in status. If the GPIB is not the Controller-In-Charge, do not specify address string.

When there are multiple GPIB controllers that LabVIEW can use, a prefix to address string in the form ID:address (or ID: if no address is necessary) determines the controller that a specific function uses. For example, to set GPIB controller 2 to talk to a device on address 3, use the prefix 2:3. If a controller ID is not present, the function defaults to controller (or bus) number 0.
Regards
Ray Farmer
0 Kudos
Message 20 of 21
(1,559 Views)