Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Instrument simulator 2.0 not compartible with Instrument I/O assistant express VI?

I recently purchased a NI instrument simulator Version 2.0 but I couldn't communicate with the device via the instrument I/O assistant express VI in serial mode.  Can somebody explain to me why this is so?  Is there any new instrument I/O express VIs that can work with this Simulator?.  I got this error message below each time I tried:

                                                                                                       

                               "Timeout expired before operation completed.  VISA Status code : bfff0015"
0 Kudos
Message 1 of 20
(5,329 Views)

Hey Mbdeck,

 

I've got a couple of questions for you. Are you trying to communicate through GPIB or Serial? Are you able to communicate with the NI Instrument Simulator in either Hyperterminal or in a VISA Test Panel? What versions of NI-488.2 and NI-VISA are you using (You can find this information in the Measurement and Automation Explorer, under the My System -> Software tree)? 

 

One more quick thing... if you have "Do 488.2 error checking" checked on the Select Instrument step in the Instrument I/O Assistant, try deselecting this and communicating. Let me know what the results of these steps are

Justin E
National Instruments R&D
0 Kudos
Message 2 of 20
(5,300 Views)

Hi Justin E,

 

The Instrument Simulator I have is the latest 2.0 version and doesn't come with dip switches. The configuration for the most part is software based. I had problems when I tried to communicate with the Simulator in Serial mode using the Instrument I/O Assistant express VI.

I was able to communicate with the Simulator through the VISA Test Panel in MAX. I have labview 8.2. 

 

I was working through a turorial using the simulator and ended up with error messages. I actually spoke with application engineers over this problem and one was suggesting that this simulator might not be compartible I/O assistant express VI which I found that hard to believe. You can't put a new product in the market with diminished capabilities than the older one.  Perhaps you can try this out yourself if you have/find this NI simulator 2.0. Here is what I was trying to do:

 

After configuring the simulator in Serial mode I followed the directions below from the tutorial:

 

 

"Place the Instrument I/O Express VI, located on the Functions>>Input palette, on the block diagram. Complete the following steps in the Instrument I/O Assistant dialog box that appears to configure the Express VI.

  1. Choose COM1 (or COM2 depending on the connection port of the NI Instrument Simulator) from the Select an instrument pull-down menu.
  2. Click the Add Step button and click Write. In the command field, type *IDN? and select \n as the Termination character.
  3. Click the Add Step button and click Read and Parse.
  4. Click the Add Step button and click Read and Parse again
  5. Click the Run button (not the Run this step button). The Run button runs the entire sequence"

  

At this point I received only error messages and nothing else.

Here is the url to the tutorial; http://cnx.org/content/m12294/latest/

 

You'd understand this problem better if you tried out those steps with this particular simulator. I will be awaiting your response.

 

Thanks

0 Kudos
Message 3 of 20
(5,297 Views)

Hey Mbdeck,

 

I found an Instrument Simulator v2.0, hooked it up, followed the directions from the tutorial, and saw the same behavior you are seeing. Unfortunately, it does look like v2.0 of the Instrument Simulator is not compatible with the Instrument I/O Assistant. I would suggest that you try and look at the Basic Serial Write and Read.vi example that we provide with LabVIEW. To find this example, open LabVIEW and navigate to Help -> Find Examples... to open the NI Example Finder. In here, verify that the Browse tab is selected and navigate to Hardware Input and Output -> Serial -> Basic Serial Write and Read.vi. I'm going to file some documentation for this issue, because it really doesn't make sense why the newer simulator is not supported with the I/O Assistant. 

Justin E
National Instruments R&D
0 Kudos
Message 4 of 20
(5,278 Views)

Mbdeck,

 

I'm actually going to research into this issue a bit more, as there is a possibility that the simulator is supported with that assistant. I will let you know what I find. Thanks!

Justin E
National Instruments R&D
0 Kudos
Message 5 of 20
(5,270 Views)

Hey Mbdeck,

 

In playing around with this Instrument Simulator v2.0, I was able to get it working with the Instrument I/O Assistant. I followed the same steps you gave, but instead of two Read and Parse steps, I only used one. These three steps, Select Instrument, Write, and Read and Parse, allowed me to communicate with the Instrument Simulator. In the tutorial, the reasoning for adding an additional Read and Parse step is because the NI Instrument Simulator version 1 sends the byte size, a termination character, then the response (I've verified this with version 1 of the simulator). Instrument Simulator v2.0 does not split the data sent between termination characters, and thus two Read and Parse steps are unnecessary. 

 

Try removing one of the two Read and Parse commands in your Instrument I/O Assistant and see if you can communicate with it. Let me know if it works out for you

Justin E
National Instruments R&D
0 Kudos
Message 6 of 20
(5,254 Views)

Hi Justin E,

 

I have not had the chance to do the tutorial again but I think you might have found the source of the problem. I will let you know how it goes. Another question I have is that I'm looking for some kind of tutorial for instrument control that is designed around the NI simulator. I've searched the NI website and haven't seen something that I could use. I found a user manual/tutorial but it was an old 1997 version.

Any information will be helpful.

 

Thanks

 

0 Kudos
Message 7 of 20
(5,233 Views)

Hey Mbdeck,

 

Take a look at the Instrument Simulator 2.0 help file

As far as finding something for instrument control designed around the simulator, the simulator is meant more as a way to test and prototype serial and gpib programs and communication. Take a look at our Instrument Control page : https://www.ni.com/en-us/shop/category/gpib-serial-and-ethernet.html 

There are various tutorials and videos here that might help you get up and running with instrument control. 

Justin E
National Instruments R&D
0 Kudos
Message 8 of 20
(5,222 Views)

Hello,

      There is also a LV PnP Instrument Driver for the NI Instrument Simulator.   You can also install it through the Instrument Driver Finder in LabVIEW (Tools>>Instrumentation>>Find Instrument Drivers).

 

Cheers,

 

NathanT

 

0 Kudos
Message 9 of 20
(5,175 Views)

Justin E,

 

I went back and followed your directions and my instrument simulator is now working fine.

 

Thanks

0 Kudos
Message 10 of 20
(5,168 Views)