LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Developing on Different Machines

Solved!
Go to solution

What is a good way to develop on a laptop and deploy to a machine with the hardware?  I ussually can develop on the machine the app will run on, but not always.

If I try to test run my app on my laptop I get all kinds of errors or it won't even run because of missing hardware.

 

This maybe a simple problem, but I've searched all over to no solution.

 

Can I tell Labview to ignore hardware errors so I can at least test the interface and report generation?

Can I simulate my hardware so I can develop and test on a machine that doesn't have all the hardware?

 

I'm using Labview 8.6.1.

 

Thanks.

 

Greg

G Yotz
0 Kudos
Message 1 of 7
(3,205 Views)
Could you provide the type of hardware you are using? Since there are differents methods for different types of hardware, this is pretty important information.
0 Kudos
Message 2 of 7
(3,197 Views)

Thanks Dennis, I should have realized that.

 

My program uses 2 COM ports, 1 Measurement Computing DAQ board (using their Labview Library), NI PCI-CAN card.

 

Greg

G Yotz
0 Kudos
Message 3 of 7
(3,179 Views)

If you are using ordinary VISA Reads and Writes for the serial instrument, you cannot do a read without getting a timeout error because there is nothing connected to the port. If you are using an IVI driver for the instrument, then IVI has a simulation mode.

 

If you were using an NI DAQ board, then you could simulate that in MAX. I don't think Measurement Computing has this. You might want to make a product suggestion to them.

 

Sorry, I really know nothing about NI-CAN.

Message 4 of 7
(3,166 Views)
NI-CAN provides two "virtual channels" - if I remember correctly they're 255 and 256 - which you can open even when no hardware is available.  They're "wired" to each other so that anything sent on one is received on the other, and vice versa.  This makes it somewhat easier to simulate and test software that uses CAN.
Message 5 of 7
(3,148 Views)
Solution
Accepted by topic author gyachts

You can put all Device specific code inside a case and put a simulation code in the other case. To toggle between simulation mode and real code can be done by a global (one of the cases I would use them). Make sure the globals are initialized before any hardware is accessed. The value for the globals might be hard coded or inside an ini file.

 

Felix

Message 6 of 7
(3,144 Views)

That gives me a couple of avenues to follow.  I wish there was a better solution.  Like a setting that redirects any IO to simulation for instance.  I guess with using none NI hardware this is as good as can be expected.

 

Greg

G Yotz
0 Kudos
Message 7 of 7
(3,119 Views)