View Single Post
  #5   Spotlight this post!  
Unread 14-12-2008, 00:58
Danny Diaz's Avatar
Danny Diaz Danny Diaz is offline
Smooth Operator
AKA: FrankenMentor
None #0418
Team Role: Alumni
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Manchester, NH
Posts: 545
Danny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond repute
Send a message via AIM to Danny Diaz
Re: Labview Simulator

Quote:
Originally Posted by Danny Diaz View Post
... simple algorithms can be run in LabVIEW ... so long as there are no ties to the cRIO hardware.
Quote:
Originally Posted by Jon236 View Post
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
__________________
Danny Diaz
Former Lead Technical Mentor, FRC 418
Reply With Quote