Hi, I am writing a code to control some actuators which need a 24V signal. Very simple ON/OFF. My code is structured with one while loop that scans a boolean matrix which contains the state of each actuator every dt of the loop.
I have initially developed this code with a CRIO 9174 USB, but since I needed more than 4 slots I am now using a CRIO 9189 which works through ethernet. Since I have changed the CRIO I have noticed that the speed of the while loop has decreased. Is that normal or is there any settings on the ethernet that I should check?
To give you an idea, if I operate with 8 channels DO it goes from 9ms to 13ms, 12 channels 14ms vs 23ms, 20 channels 43ms vs 65ms.
I have attached screenshot of the code and the boolean. Is there any quick fix to make the loop faster? Ideally I would like the square wave to be at 20Hz which would need at least 25ms. At max I have a total of 64 channels which makes things worse. I have planned to move to a PXI in the future, but perhaps there is something I can do now.
Many thanks for the suggestions!