LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA control loop doesn't respond qickly after several tries.

Hello, guys, I am newbie on labview. I have labview code running on CRIO 9073. The program run properly to go UP and DOWN stopping at limit switches(see pic circle red below) only for limited number of tries. After several tries, it start not responding quickly on time to limit switches. The controls (see pic circle blue below) are criticals(should respond faster than ever) and need to be deactivated when limits reached . The programr runs continously in while loop  under FPGA. cRIO_9073_FPGA_Question.jpg

Thanks

0 Kudos
Message 1 of 5
(2,794 Views)

Hi kodj,

 

I am newbie on labview.

Yes, that can be seen by the lack of using AutoCleanup on your code! 😄

(And all those RubeGoldbergs, not to mention the wrong spelling of LabVIEW…)

 

- Please clean up your code.

- Replace those RubeGoldbergs: most often a Select node is overkill for boolean logic, use basic AND/OR/NOT or "Boolean To 0/1" functions!

Best regards,
GerdW


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

You'll need to post more code - the entire VI would be helpful, instead of just an image - in order to understand what you're doing. Can you simplify your code down to just the part that's having a problem? Have you tried replacing the digital inputs with front panel controls, then running it in simulation on your PC so you can debug it more thoroughly with the LabVIEW debugging tools (probes, execution highlighting)? It won't solve your problem, but you can clean up some of the logic. Near the sections you circled, replace the Select nodes with AND. There's probably similar opportunities elsewhere in your code.

0 Kudos
Message 3 of 5
(2,756 Views)

I just Clean up the code And I have attached theFPGA_Control  vi. Let me know how you will improve the code for performance.ThanksFPGA_Cleanup_crrio.jpg

 

0 Kudos
Message 4 of 5
(2,753 Views)

This code is still difficult to read and there's no explanation of what you want it to do. Have you tried running it in simulation as I suggested? (In the project, right-click the FPGA, and change the Execution Mode). Also, you're using several instances of a subtract function that's no longer supported by LabVIEW according to the help (maybe you're running an older version than me) and you didn't make the logic changes that both GerdW and I suggested.

0 Kudos
Message 5 of 5
(2,735 Views)