Jump to content

any way to mimic NI hardware for testing my LV program?


GSR

Recommended Posts

QUOTE (zmarcoz @ Feb 23 2009, 10:34 AM)

..or why don't you use an object oriented approach with simulated objects.

This is how I’ve solved it.

All instruments inherits from a VdTestInstrument-Base class

This class has child classes for every instrument type I need.

E.g. Power Supply, Digital Input units, Switches, Climate Chambers.

For every sub group of instrument e.g. the Label Printing-class, I create a Simulated class and then the real implementation classes in this example I have three different implementations for printing a label.

post-941-1235358582.png?width=400

In every Simulation class I register this simulated object to a <SINGELTON> class I call “VdTestInstrumentSimulation”.

post-941-1235358659.png?width=400

;-)

This class shows a dialog box where I can select which simulated objects to open.

The dialog box dynamically opens the “SimulationDialog” method in the simulated class that gives the user an interface to the Simulated object.

Here the user can monitor what is written to the object and also control what responses the object should report back when you do a e.g. Read function on the object.

E.g.

post-941-1235358668.png?width=400

This is how I can simulate all instruments on my Rig, I also of cause create a simulated DUT unit so I can test my software completely before deploying it in production.

Cheers,

Mikael

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.