Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers to communicate NI Instrument simulator v2.0

Hi,

 

I'm trying to acquire a DC Voltage reading from an NI instrument Simulator V2.0 and the my VI isn't working. I set the Simulator to multi-mode (DMM, WF GN and Oscope) and trying to get a DC reading with DMM from simulator. I've downloaded a good number of drivers but the same problem keep occuring at the Read DC Measurement driver vi. I had this problem a while and I'm trying to review and refresh memory and I having problems again. Here is the error message below:

Error -1073807339 occurred at VISA Read in NI Instrument Simulator.lvlib:Read.vi->NI Instrument Simulator.lvlib:Read DC Measurement.vi->My New Voltage Monitor.vi

Possible reason(s):

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

I'll appreciate any help. See attached VI.

0 Kudos
Message 1 of 17
(6,312 Views)

Hey,

 

It looks like you may be using the older instrument driver for v1.0 of the simulator. The driver for v2.0 can be found here

 

Try downloading that driver and running through a few of the examples to see if you can get things working.

Justin E
National Instruments R&D
0 Kudos
Message 2 of 17
(6,288 Views)

Hi Justin_E

 

I was able make the corrections in the earlier post thanks. Anyways, I've been trying to learn Labview Instrument control on my own using my NI instrument simulator v2.0 and encountering quite a few problems. My questions are two fold:

1)

I tried using the NI simulator example VIs and none of them were working. Both the single and multimode VIs produced error messages each time I ran them. I think either I'm doing something wrong or the example VI code is just wrong. I say this because on the example finder, there were several typos and omissions on the description section of the VIs. It seemed as if no one checked the write up before posting them on find examples section. 

  

2)

Also, I would like to build a single VI that will control all three simulated VIs namely WFM GN,OSCOPE and DMM. Can you give me a guide on how to start. The seemingly disfuntional examples VIs didn't offer much help. You need to run the VIs to see what I'm saying.

 

Anyhow, I'm stuck. Please I'll appreciate any help. I've attached the example VIs. Please make any corrections in Labview 8.2 because that's I'm using.

 

Thanks

0 Kudos
Message 3 of 17
(6,226 Views)

Hey Mbdeck,

 

I was able to get both examples you posted working on my Instrument Simulator v2.0 without any major issues.  You can test communication with your device through MAX's "Communicate With Instrument" utility. Can you see your instruments when you scan for them in MAX? If so, try sending a *IDN? command to the instruments to see if they're working properly. If you continue to have issues with the examples, you may want to try re-downloading the driver. If this still doesn't help, you can always use VISA functions to communicate with your instrument. The programming guide is in the NI Instrument Simulator Help file, if you want to develop drivers for this instrument yourself. This may be a better exercise if you're preparing to control different instruments in the future, which may or may not have instrument drivers.

Justin E
National Instruments R&D
0 Kudos
Message 4 of 17
(6,210 Views)

Hi Justin_E,

 

I checked the device in MAX and it was fine. I downloaded the drivers again and tried to run the example VI and still got the same error messages. Can you outline exactly what you did?  It will be too limiting if I can't use the example VIs while I'm still learning.  Here is the error message I got. Maybe it will shed more light on the problem

 

Error 85 occurred at Scan From String (arg 1) in National Instruments Instrument Simulator.lvlib:Read Waveform.vi->National Instruments Instrument Simulator Acquire Waveform Advanced(Scope).vi .Possible reasons: Scan failed. The input string does not contain data in the expected format.

 

0 Kudos
Message 5 of 17
(6,197 Views)

Hey Mbdeck,

 

I ran the advanced example again today, and am now receiving the same error you are getting, which is strange. This error is referring to the Scan From String function within Read Waveform.vi. It looks like what may be happening is the device isn't prepending its data with the byte count, so the Scan From String cannot find this and thus errors out. If you remove those sets of functions, you read more data than what's available, which gives you a strange graph. Let me know look into a bit more to see why this may be occuring. Were you able to get the first example working?

Message Edited by Justin_E on 09-16-2009 05:03 PM
Justin E
National Instruments R&D
0 Kudos
Message 6 of 17
(6,169 Views)

Hi Justin_E

 

I continued to experience problems with the advanced example vi until I changed both the Visa Resource names for the WF GN and the Oscope to COM1. That's when the VI started working.  It seems that most of the example VIs have serial configuration and therefore won't work if you try to use the aliases you configured in GPIB. On the other hand I couldn't designate the aliases for a serial connection like I did with GPIB setting. I had to enter COM1 for both instruments. I wonder why you can't have aliases for the simulator devices when you are operating in multi-mode while using a serial interface.

 

 

0 Kudos
Message 7 of 17
(6,161 Views)

Hey Mbdeck,

 

From what I'm seeing, it looks like multi-mode on the instrument may not send data back correctly. What's happening is that the Scan From String VI is looking for something like "#4" at the beginning of the data. In single-mode using the non-advanced example, you'll see something like "#41000...", where #4 is the number of bytes the data range identifier is, and the next four digits are the amount of data being returned. This allows the VI to parse only those 1000 pieces of data. In multi-mode with the advanced example, all that's being received is a set of ASCII data, without any header information. This may be a malfunction in the instrument itself, or an issue with the instrument driver code. I'm going to be looking into this a bit more, and will let you know what I find. Thanks!

Justin E
National Instruments R&D
0 Kudos
Message 8 of 17
(6,144 Views)

Hi Justin_E,

 

Can you please check this VI I attached to see if you can figure out why I'm getting an error message?. I'm trying to perform direct I/O with VISA using one VI for both GPIB and Serial.  I'm running it in serial mode and getting an error message at the VISA Read function. This is the error message below:

 

Error -1073807339 occurred at VISA Read in VISA Write and Read.vi.  Possible reasons

Visa:(Hex OxBFFF0015) Timeout expired before operation.

 

 

 

0 Kudos
Message 9 of 17
(6,104 Views)

Hey Mbdeck,

 

In looking at that program, you may need to add a short delay in between the VISA Write and the VISA Read to allow the instrument time to process the command. Check out the Basic Serial Write and Read example in the NI Example Finder.

 

I'm still in the process of researching the Instrument Simulator issue, and will let you know what I find. Thanks!

Justin E
National Instruments R&D
0 Kudos
Message 10 of 17
(6,089 Views)