From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulated hardware

Solved!
Go to solution

Hello all,

I'm going to be giving lessons about CVI programming soon, and if I have all^H^H most of the C/UIR stuff ready, I also would like to show hardware interactions. I usually do all my hardware communication on Linux, so I'm a bit rusty with the various codes. And also I won't have actual hardware handy.

 

So my question breaks down to: is there a way to simulate hardware ? Either on the same system in pure software, or on a separate machine with the appropriate soft+cable.

 

Let's see the details:

- niDaqmx: I think the answer is yes as I remember using it once.

- USB to give an example of use of VISA.

- Serial. I imagine I could run some serial talk program on a separate PC with a cross-over cable. Or in the simplest case, a null-modem bounce ?

- GPIB. Same as serial I guess.

 

Any advice ?

Thanks.

0 Kudos
Message 1 of 3
(3,785 Views)
Solution
Accepted by topic author gdargaud

Hi,

 

As long as DAQmx is installed, you should have no trouble making a simulated device in MAX. Just be sure you simulate a device that is capable of what you're trying to do. An X series card like the 6353 should cover most of the basics (analog & digital I/O + counters).

 

USB, Serial, and GPIB all fall underneath VISA / Instrument Control. Short of having one of these, a serial communication program like you've described is a good way to get some hands on experience. You could also have them do a loopback test to demonstrate the very basics.

 

Arguably, the most important thing you can teach is where to find more information once the class is over. Be sure to let them know where they can find shipping examples. Also, the IDNet is a good place to go for instrument specific drivers (and device specific examples in some cases). Most student's won't remember everything from a class, so they'll be a lot better off if they know where they can find information later on.

 

Hope this helps! Good luck with your class!

https://www.linkedin.com/in/trentweaver
Message 2 of 3
(3,758 Views)

Thanks for the excellent info.

 

I just played around with MAX and I didn't know that you can basically simulate any device. I thought there was only one kind of simulated device. That's good as I can reuse the code I've written in the past for real hardware and adapt it for the course.

 

As for VISA, I only ever used it to write USB drivers for our own custom hardware (but nowadays I prefer to use libusb). I'll see how to use it on other cases.

 

I didn't know about the instrument simulator. It would be a great tool for teaching if not for the price.

0 Kudos
Message 3 of 3
(3,736 Views)