02-18-2014 04:45 AM
Hello!
I'm developing an application to send and receive analog and digital I/O with Easyport. The problem i have is that i implement some of this I/O's and they work fine, but when i incresa them the program stops reading and generating I/O's. For example, i'm reading one analog input, but if I want to read all four possible analog inputs the program stops reading inputs and controlling outputs´. The logic of the program and subVI's are correct, a proof of that is when i run the program on Execution Highlighting (lightbulb) it reads the analog inputs without any problem, but when I run it normally it stops working.
I'm attaching my current program that works without problems before adding analog inputs (alpharack.vi) and the extended version that has this problem (easyport_openloop_analogexperimentation.vi) with all analog inputs implemented.
02-18-2014 04:47 AM
missing files...
02-18-2014 06:54 AM - edited 02-18-2014 06:55 AM
Hi manupau,
what a bunch of Rube-Goldberg:
All you need is:
And you could even put all those boolean controls in an array on your frontpanel…
The same applies to your bit value display. Why do you need to copy an array indicator 16 times to display all 16 elements of a boolean array?
Why do you use so many global/local variables? Use wires instead to prevent race conditions!
when i run the program on Execution Highlighting (lightbulb) it reads the analog inputs without any problem, but when I run it normally it stops working.
This usually comes from a timing problem when you access your hardware too fast - or by Race Conditions…
03-04-2014 02:27 AM
Hello GerdW!
Thanks for the simplification, I'm using a german version and it is quite difficult to find the right things sometimes. Regarding the problem, I already solve it, the computer was accessing the easyport faster that it could respond, and using the simulation and control package it works perfectly without any problems
03-04-2014 02:30 AM
03-04-2014 02:34 AM
Well it was quite easy, I just replaced the main while loop with a simulation loop and defined the time step
03-04-2014 02:37 AM