LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Easyport

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.

 

0 Kudos
Message 1 of 7
(2,447 Views)
0 Kudos
Message 2 of 7
(2,446 Views)

Hi manupau,

 

what a bunch of Rube-Goldberg:

check.png

All you need is:

check.png

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 7
(2,421 Views)

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 Smiley Very Happy

0 Kudos
Message 4 of 7
(2,354 Views)

Hi manupau,

 

"using simulation and control package" doesn't sound like a solution but rather like a workaround… 😄

 

But when it works it should be ok for you!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(2,350 Views)

Well it was quite easy, I just replaced the main while loop with a simulation loop and defined the time step Smiley Happy

0 Kudos
Message 6 of 7
(2,347 Views)

Hi manupau,

 

using a simple Wait function in the while loop wouldn't do the same?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(2,345 Views)