08-01-2018 09:26 AM
Hi,
I'm want to test my LV-software by using Hardware in the Loop. And I want to do this by using automated tests.
So I want my software to communicate with a real bus, but the devices connected to the bus shouldn't be real. So the bus should get signals/data from another device, which simulates the device?
Do you know anything about doing something like that?
08-01-2018 09:32 AM - edited 08-01-2018 09:35 AM
I have done similar things using the Unit Test Framework (User Defined Tests).
With user defined tests, a template is created and you can set up your hardware, run your UUT and then shutdown your tests
If you are able to Set Up / Teardown your hardware within a single function then you can use a unit test within the unit test framework.
The Unit test framework is included with LabVIEW Professional (or can be purchased separately)
For simulated devices, you can create a model which acts on data received.
If this is going to be a major part of your role, you may want to consider VeriStand
08-01-2018 02:42 PM
Hi Tom,
thanks for your reply. We are still using the Unit Test Framework, with models which act on received data.
But we are looking of another solution.
I already heard of VeriStand, but it seems to be very complex, but I'll evaluate it the next days.
Thanks 🙂
08-01-2018 03:37 PM - edited 08-01-2018 03:38 PM
VeriStand is one of the courses I teach, so if you have questions feel free to DM me - The same with UTF.
Why are you looking for an alternative? What difficulties are you facing?
08-01-2018 03:59 PM
At my company we have an instrument class library using LVOOP. Since every instrument connection is a class with all of the instrument communication VIs being dynamic dispatch, it's a relatively simple matter to replace all of the "real" instrument classes with what we call "Active simulation" classes. These active simulation classes are set up to communicate with each other... so for instance, when we increase the amount of amps the "active simulation" power supply puts out, the "active simulation" temperature controller starts reporting a temperature rise and the "active simulation" output power sensor reports an increase in the amount of watts the device is outputting, and so on.
Here's an article that talks about a LVOOP-based HAL when using a specific toolkit, but even if you don't use their toolkit it's a good starting point if you don't know what I'm talking about at all.