GPIB issue - labview
This is a discussion on GPIB issue - labview ; Hello,
 
I am having an issue with a GPIB instrument where the only way I know to recover from is to quit labview and restart labview.  Communication is lost to the instrument unless I restart labview, not the program ...
-
GPIB issue
Hello,
I am having an issue with a GPIB instrument where the only way I know to recover from is to quit labview and restart labview. Communication is lost to the instrument unless I restart labview, not the program written in labview. I am wondering if there is a function that simulates what labview does to the GPIB card in the PC, when labview starts?
Thanx,
Karl
-
Re: GPIB issue
Hello smercurio_fc,
I guess I can do that but labview is certainly doing something since I am able to resume communication with the instrument only after restarting labview, unless there is some sort on reset command I can send from within labview. I am using labview V8.2, this behavior was the same under older versions of labview.
Thanx,
Karl
-
Re: GPIB issue
Hello Beach,
I guess you are having some problem like, when you close your application your GPIB is still under the control of Labview. I think what you can do is try to look for a Local Button on your instrument that you can free your instrument at any moment from the GPIB.
I dont know what exactly goes behind when you do a GPIB control from Labview but it does locks out the GPIB and does not free the instruments until Labview is closed completely even when the VI which used to control the GPIB is closed.
Ravi
-
Re: GPIB issue
Well I do not think it is anything like a port left open or else there would be a way to deal with it from within labview. Anyway here is an example of the code and a template from the SUSS Proberbench Remote Communicator help file. This instrument is actually a multi axis controller and does not have a remote or local front pannel as wou might find on a function generator etc.
Help File (there can be up to four XYZ probes) with example at end:
Command:
ReadProbePosition
Data:Probe# Char (required) 1, 2, 3 or 4 Unit Char (optional) Y micron (default)
I mil
E encoder steps
PosRef Char (optional) H from home (default) Z from zero
C from center
CompMode Char (optional) M matrix comp
L lin comp only
N no comp
Response:Probe# Char 1, 2, 3 or 4xPosition FloatyPosition FloatzPosition Float
Description:Returns the actual Probe# position in X, Y and Z. The default Compensation Mode is the currently activated compensation mode of the kernel.
Example:Command: ReadProbePosition 1Data Response: 1 -1263.4 6766.7 -3336.7
ProberBench Version 4.0
The code is simple... a typedefed command followed by the relevent arguments for the command, a VISA write, delay (a delay is required whether there is a write/read or just a write) and then VISA read.
Cheers,
Karl
PA200.llb:
http://forums.ni.com/attachments/ni/...31/1/PA200.llb
-
Re: GPIB issue
Hey Beach, Maybe I'm misunderstanding your problem.Are there LabVIEW drivers available for your device, or do you have to develop them yourself? With the additional information you've provided, it seems you are developing the drivers yourself. What happens if in your main application, you close the GPIB port before exiting the program? Also, does the communication between your PC and the instrument work properly the first time you run LabVIEW?As far as I know, with NI-VISA, the GPIB ports are listed just like the
Serial COMM ports, and you certainly have to open and close those ports
properly in order to allow any other program to access that port.
Nearly all of the drivers/example programs I've used from the
manufacturers (such as HP/Agilent equipment) include an Initialize VI and a
Close VI, specifically for releasing the port for other applications. They also usually incorporate some sort of functions to set the device into a safe state before releasing the port as well.B-)
-
Re: GPIB issue
Beach Comber,
In an earlier post, you mention that you have to have dedicated GPIB controller for this instrument. Is that still the case? If so, then the instrument is not only not comliant with 488.2, it's not compliant with 488.1 or any other GPIB standard and the problem might be with the instrument itself. Instead of VISA, you might want to experiment with the low level GPIB functions. There is the GPIB Clear and GPIB Initialization that you can try calling periodically to see if they make a difference. Performing a GPIB Status could also give you a clue as to what might be happening. If the instrument as an error query, you could also try calling that after every write to see if there is something it's reporting.
Similar Threads
-
By Application Development in forum labview
Replies: 0
Last Post: 10-15-2007, 01:10 PM
-
By Application Development in forum labview
Replies: 0
Last Post: 10-15-2007, 06:40 AM
-
By Application Development in forum Software-Eng
Replies: 0
Last Post: 07-15-2006, 08:28 PM
-
By Application Development in forum Python
Replies: 0
Last Post: 10-08-2003, 03:11 PM
-
By Application Development in forum Javascript
Replies: 2
Last Post: 09-19-2003, 01:17 PM