02-15-2018 01:38 AM
When i am developing code for machine control, the normal challenge is to test the code for functionality before loading on to actual machine. This is much safer and almost the full sequence can be safely tested out. For this currently i use a Hardwired simulator which has following functionality :
1. 32 Toggle switches to simulate Digital Inputs ( DI)
2. 32 LEDs to check digital outputs ( DO)
3. 16 Potentiometers to simulate Analog Inputs ( AI)
4. 4 nos DPM to verify the Analog Outputs ( AO)
But the problem this hardwired simulator is bulky and not portable.
What i want to do instead is develop a simple LV interface with all of the above in Software and run that on another computer or tab. Then send the variables alone from that interface to the PC running actual code. In essence the variables will replace the DAQMx I/O signals.
Doing this in software has many advantages like customized controls for each project, portability so i can test code on the move etc without having to contend with the large Hardwired stuff.
Anybody done such a thing ... one of the challenges i have is to pass the variables via USB..
Solved! Go to Solution.
02-16-2018 11:58 PM
( I had earlier posted this in LabVIEW forum and drew no response. Either what i want is very unusual or its not the right place to ask this ) So trying here.
When i am developing code for machine control, the normal challenge is to test the code for functionality before loading on to actual machine. This is much safer and almost the full sequence can be safely tested out. For this currently i use a Hardwired simulator which has following functionality :
1. 32 Toggle switches to simulate Digital Inputs ( DI)
2. 32 LEDs to check digital outputs ( DO)
3. 16 Potentiometers to simulate Analog Inputs ( AI)
4. 4 nos DPM to verify the Analog Outputs ( AO)
But the problem this hardwired simulator is bulky and not portable.
What i want to do instead is develop a simple LV interface with all of the above in Software and run that on another computer or tab. Then send the variables alone from that interface to the PC running actual code. In essence the variables will replace the DAQMx I/O signals.
Doing this in software has many advantages like customized controls for each project, portability so i can test code on the move etc without having to contend with the large Hardwired stuff.
Anybody done such a thing ... one of the challenges i have is to pass the variables via USB..
02-17-2018 12:57 AM
Hi MogaRaghu,
why additional computer for simulation, when you can test with the development system itself.
create a vi for simulation and exchange data, or create a simulation condition in your actual code itself.
02-17-2018 01:08 AM
@bharathp10 wrote:
Hi MogaRaghu,
why additional computer for simulation, when you can test with the development system itself.
create a vi for simulation and exchange data, or create a simulation condition in your actual code itself.
I actually was expecting this suggestion. Its OK for small code with a handful of IOs and I actually do it also ....but when the machine code is something like 20 DIs / 32 DOs / 14 AIs and 4 AOs its not the best or even a workable solution. And another thing many times the client would like to handle the simulation himself to check out and for that the external simulator is the only way forward.
02-17-2018 01:42 AM
Hi MogaRaghu,
The code you are using for the simulation can be used in the development system right?
I was suggesting why additional resources when you can do it with the single computer.
If the code is working in the external simulator for Large no of IOs, it should work in the development system too.
i have not worked on projects involving control through remote system, but for simulation its not a problem creating simulator version of the application.
02-17-2018 04:40 AM
@bharathp10 wrote:
Hi MogaRaghu,
The code you are using for the simulation can be used in the development system right?
I was suggesting why additional resources when you can do it with the single computer.
If the code is working in the external simulator for Large no of IOs, it should work in the development system too.
i have not worked on projects involving control through remote system, but for simulation its not a problem creating simulator version of the application.
Ok since you say you have not worked on systems with large I/O count, here is a typical screen for a medium size project. Now you will understand why I cannot add the simulator interface also to this screen.... I just don't have display space !!
02-18-2018 12:19 PM
Hi Raghutan,
Then send the variables alone from that interface to the PC running actual code. In essence the variables will replace the DAQMx I/O signals.
Then you need to program a "test mode" in your DAQ software to allow switching from DAQmx inputs to "variables" input…
one of the challenges i have is to pass the variables via USB.
Here I see a major problem: USB is not intended to connect two PCs!
Usually you have a "USB master" (PC) and "USB slave" (like thumbdrive, external harddisc, whatever). Having communication between two PCs using USB connection is "uncommon"…
I would prefer a Ethernet/LAN connection between your two PCs and use some kind of network communication!
02-18-2018 11:11 PM
@GerdW wrote:
Hi Raghutan,
Then send the variables alone from that interface to the PC running actual code. In essence the variables will replace the DAQMx I/O signals.
Then you need to program a "test mode" in your DAQ software to allow switching from DAQmx inputs to "variables" input…
one of the challenges i have is to pass the variables via USB.
Here I see a major problem: USB is not intended to connect two PCs!
Usually you have a "USB master" (PC) and "USB slave" (like thumbdrive, external harddisc, whatever). Having communication between two PCs using USB connection is "uncommon"…
I would prefer a Ethernet/LAN connection between your two PCs and use some kind of network communication!
You are getting close to what I had in mind. Why USB ? Because I have a spare USB-6212 board which I can use in place of the actual DAQ Board on machine - of course I already have a selector called DEMO/ACTUAL to invoke the correct interface. So in this arrangement I can of course use the USB without issues.
But your idea of a Ethernet opens up a new line of thinking - why use a board for simulation at all ? Just use the right variables in a Array / cluster and pass instead of DAQMx variables over the RJ45 ( or WiFi ) port. So would this be done by the Shared Variables ? Never used them till date....
Thanks for the brain storming.
02-18-2018 11:33 PM
Hi MogaRaghu,
I was telling the same..why board? why additional pc? why communication?
when you can create another VI and communicate with that..
02-18-2018 11:52 PM
@bharathp10 wrote:
Hi MogaRaghu,
I was telling the same..why board? why additional pc? why communication?
when you can create another VI and communicate with that..
No. What GerdW proposed is different. Additional PC and Communication are very much there.