Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   National Instruments LabVIEW and Data Acquisition (http://www.chiefdelphi.com/forums/forumdisplay.php?f=149)
-   -   Labview Simulator (http://www.chiefdelphi.com/forums/showthread.php?t=70540)

Phalanx 11-12-2008 23:31

Labview Simulator
 
I had heard that there is a way to run/simulate/test the 2009 Labview Robot code on the desktop machine standalone without using a CRIO to deploy on.

I could be totally off the mark, but if this is possible, could some one point me in the right direction to set this up?

Mark McLeod 12-12-2008 09:43

Re: Labview Simulator
 
I haven't tried it yet, but I can repeat things I've heard...

In the Project Explorer window the vi's you want to run on your PC need to be under "My Computer" so it gets compiled for that target.

You can do a copy/paste of the vi's under "RT CompactRIO Target" to "My Computer" then build for that target platform to get them to run on your PC instead of the cRIO.
I'm not positive how you'd simulate system inputs/outputs, although I imagine it's pretty easy to hook it up to a USB game controller or joystick.

Danny Diaz 13-12-2008 02:30

Re: Labview Simulator
 
Quote:

Originally Posted by Phalanx (Post 782889)
I had heard that there is a way to run/simulate/test the 2009 Labview Robot code on the desktop machine standalone without using a CRIO to deploy on.

We do not currently have simulated devices for the cRIO modules in LabVIEW. Therefore, you cannot simulate the cRIO hardware on the desktop. However, simple algorithms can be run in LabVIEW (it's just in LabVIEW) so long as there are no ties to the cRIO hardware.

-Danny

Jon236 13-12-2008 14:51

Re: Labview Simulator
 
Danny,

Can you use the conditional disable structure to do that?

Danny Diaz 14-12-2008 00:58

Re: Labview Simulator
 
Quote:

Originally Posted by Danny Diaz (Post 783270)
... simple algorithms can be run in LabVIEW ... so long as there are no ties to the cRIO hardware.

Quote:

Originally Posted by Jon236 (Post 783322)
Can you use the conditional disable structure to do that?

Absolutely. You can use conditional disable structures in your code to remove ties to the cRIO hardware; my first inclination is that you can use the OS environment variable to key off of, I use "OS==Win" and "OS!=Win" conditions inside the conditional disable struct for similar Windows-versus-NonWindows code within LabVIEW. This of course means you will most likely want to have your own VIs for sensor "simulation" within the Windows environment if your code relies upon sensors, and you will want to simulate side-effects of certain actions (like tripping limit switches or similar) when making calls to sections that would normally involve running motors.

Using the conditional disable structures allows your code to run in a "sandbox" if you want to think of it like that, but it may take significant additional work to make your code work properly within this sandbox if you normally have dependencies on cRIO hardware. I envision that this kind of "sandboxing" will be the first-pass "poor-man's simulator", and then the next phase could be a "simulated target" in the project where you could deploy VIs to and the NI-distributed VIs would use this "sandboxing" technique (or possibly something better, I dunno) to perform dual-purpose code for simulation of cRIO hardware.

Good luck!
-Danny

Phalanx 14-12-2008 12:28

Re: Labview Simulator
 
Thanks for all the interesting discussions and ideas. I'm very "green" when it comes to Labview.

My initial thoughts were to simply be able to develop and debug new VI's within the FRC structure without needing to be tied to the CRIO. I can certainly see how that can be very doable.

Perhaps in time, a method of logic testing could be developed using a file as "input" in place of a Robot, DS, CRIO, Sensors and run more detailed simulations. Something akin to what the old Labview Dashboard could do.


All times are GMT -5. The time now is 18:34.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi