08-03-2009 05:33 PM
Hi All,
I'm trying to send commands to a very old Klinger CC1.1 motion controller over the GPIB from labview 8.6. I've tried using a GPIB-USB-HS and a GPIB-USB-B. The Klinger takes simple ASCII commands setting the speed, number of steps, etc. When I try to send these commands using the GPIB Write sub VI in labview, the Klinger does not seem to receive them properly (I'll set it to move 100 steps, send the go command, and it will travel all the way to the end). When I send the commands using MAX, they work just fine. I used NI spy to moniter the commands I was sending, and it seems like the only difference is that MAX uses the ibwrt command, while Labview uses GPIB Write.
Is there a way to use the ibwrt command in labview? If not, why wouldn't the commands be received properly when sent using GPIB Write? I've tried using the GPIB initialize VI, but it doesn't seem to make a difference.
Solved! Go to Solution.
08-04-2009 12:11 PM
Hi jhinton,
I think you might find this KB interesting:
Let me know if that helps.
Scott M.
08-04-2009 01:47 PM
jhinton wrote:
Is there a way to use the ibwrt command in labview? If not, why wouldn't the commands be received properly when sent using GPIB Write? I've tried using the GPIB initialize VI, but it doesn't seem to make a difference.
Depends on what you mean by "a way". Technically, you can call the ibwrt command by calling the DLL in which it resides. But I'm guessing that's probably not what you meant.
New code should use VISA rather than the GPIB functions. The problem may be with the mode that's being used. Can you upload a capture of NI Spy? It's best to upload a capture that you do using MAX, indicating a proper operation, and a capture using LabVIEW trying to do the same thing.
08-04-2009 02:07 PM
I'm pretty certain that I have the GPIB address set properly. If calling the ib function DLL would work, it sounds like a reasonable solution. How would I do this/where would that DLL be located? Why is it prefferable to use VISA functions (other than the issue of portability, which is not really that important to me)?
I'll upload the NI spy screen captures as soon as possible.
08-04-2009 02:21 PM
I'd say the advantages of using VISA over GPIB programming is to avoid exactly the troubles you are having. VISA does the talking to your instrument driver for you so you don't have to guess what the instrument is expecting.
Bill
08-04-2009 05:27 PM
08-04-2009 11:41 PM