Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

String communication

Hello,
 
Trying to make communication with an external device via USB. I can turn on/off the device and among other things. However, I have trouble when I need to acquire data (returning data back to the PC from the device). I believe it requires to send a command and that is where I'm having trouble. I'm not sure how to send commands via LabVIEW. If I can just get one example on the attached subvi I should be good.
 
I've attached the "Pmca Set Time" subvi. It is a function called from a .dll  The info is also attached in a pdf the "Set time" instructions is on page 6 of the attached pdf.
 
 
 
Download All
0 Kudos
Message 1 of 2
(3,328 Views)

Hi DC Motor,

Since you are using a 3rd party .dll to perform your communication, this issue may be more of a LabVIEW/.dll use question than really an issue of Instrument control via USB.  Are you able to use the 3rd party program independently of LabVIEW and communicate successfully with your instrument?

You also mentioned that you can turn the device on and off successfully - did you do this from within LabVIEW using the Call Library Function Node block to access this 3rd party .dll or through some other mechanism?  If you did accomplish this through LabVIEW with the .dll, I would anticipate that it is the .dll call for this particular function that is the real issue at hand.  See this link for information regarding the usage of the Call Function Library Node.  I noticed in your code that you input a string for the Set Time function, although the attached .pdf indicates that you should send your instrument 4 bytes worth of data.  Is there a reason you're sending a string rather than a 4-byte numeric?

Hope this helps!


Regards,
Anna M.
National Instruments
0 Kudos
Message 2 of 2
(3,291 Views)