11-06-2018 03:46 PM
Hello fancy folks,
I was wondering if anyone has every ran into a problem with the Call Library Function Node where it will cause your code to hang.
I inherited some code which runs a motor CW then CCW for around a million times. The code worked well for the past few years but has started hanging recently. Normally, we run the exe version of the code, but due to the hanging problem, we ran the VI version so I could try and debug it. Recently, the hanging problem occurred and I did some rough highlight execution “debugging” to see where the code “is stuck” by following the colored vs non colored path (already executed vs not yet executed). This led me to a VI which does some math on a one element array then sends it to NI-CAN write. My thought is that the NI-CAN write is causing the problem.
I should mention that there is a “sister loop” which performs a NI-CAN read function to get the motor’s position. While the write loop hangs, the read loop still executes. If I try to shut down the test using the stop button, the code will “lock up”. Even pressing the abort button won’t shutdown the code and ill have to ctrl+alt+del to stop the code.
Attached is a scaled down version of the loop I am looking at. The project should have everything but NI-CAN write. “scaled down version of main code.vi” is the “top level” here and the VI where my hang is occurring is in the “VI in question” virtual folder.
The inherited code is written in LV 8.6 (attached code is in 2015 now since that’s what I have on my main PC and scaled down the program to submit here) and has NI-CAN version 2.7. The PC running the code has windows XP as the OS.
Thanks,
Matt
11-06-2018 08:15 PM
an update of the Ni-Drive could cause this issue... .dll corrupted as well...
OLD PC = aging = trouble....
Benoit
11-07-2018 08:46 AM - edited 11-07-2018 08:50 AM
Benoit,
You're not wrong. I'd love to get everything up to date around my parts, but the mentality of others is, "if it aint broke, why fix?" then we run into problems where we use product lines that are retired and can't get replacement parts.
That being said, my first thought aligns with the dll being corrupted. I was thinking of reinstalling NI-CAN 2.7 and hoping for the best.
EDIT: The 8.6 computer hasn't been upgraded since the inherited code was written. The 2015 version that I attached in the previous post was me taking the code from 8.6 computer, copying it to my flash drive, and bringing it back to my main PC, 2015, to post here. Any changes I would perform would be on the 8.6 version of code would be on the 8.6 machine. I figure any conversion between LV versions could bring unwanted hassles.
Matt
11-13-2018 09:34 AM
I "upgrade" my NI-CAN from 2.7 to 2.7.5 (latest release that LV 8.6 supports) and I'm still getting the hanging condition. Could this be an issue with LV 8.6's library call? I don't think that would really make sense because the there is a loop performing an NI-CAN read that uses the Call Library Function Node that executes fine in the other parts of the code.
My other thought is that maybe windows is doing something in the background that's halting execution. I know we have removed all screen saver abilities because that was causing some issues in the past. We haven't upgrade or installed any updates on the PC running LV since its a stand alone machine. It's just strange that the code worked for so long and then one day stopped.
My other thought is to switch from NI-CAN to XNET.
Matt