03-02-2007 02:09 PM
03-02-2007 02:17 PM
Here's an exampe of a VI calling on the globals created in the master VI...in case it matters.
THanks,
Jim
03-05-2007
05:33 PM
- last edited on
08-10-2026
09:11 AM
by
Content Cleaner
Hi Jim,
Is it possible for you to break down this code to a small piece that still produces this problem? That will make it easier to troubleshoot. Does this happen on every computer that you run this code on? You can also use NI-Spy to capture your calls and errors. Performing a Good NI-Spy Capture for Debugging/Troubleshooting
Thanks!
Meghan
Applications Engineer
03-06-2007 10:20 AM
Meghan,
Thanks for taking a look at this! I will work on breaking down the code to a simpler form and try to clean it up a bit. I'll resubmit when that's done. In the meantime, I'm running NI-SPY and the VI to try and catch the error again but so far it has not occurred. Usually it happens within the first 30-45 minutes of run time. It's been running for over an hour now without problems, which is odd...first time that's happened. I was having a lot of trouble yesterday so I'm not sure what the deal is.
So far, I've only been running it on one computer while I'm developing it for the application.
Thanks,
Jim
03-06-2007
10:48 AM
- last edited on
08-10-2026
09:12 AM
by
Content Cleaner
Hi Jim,
Take a look at this knowledgebase - Why Does My Application Only Work While NI-Spy is Running? [link removed; article no longer available] You may need some timing delays in your application.
Have a great day,
Meghan
Applications Engineer
03-12-2007 03:27 PM
Meghan,
I have looked at the knowledge base, rewritten the code to include some delays but I'm still getting the error. I've also included an additional sequence to break the data transfer into 2 reads in case the modbus drivers were not taking care of the transfer. I know that the 6101 time out error is being generated in the modbus serial recieve subvi that reads the data from the PLC, I just don't know why I'm getting the error. I suspected that the delay issues would be causing the problems but increasing the delays hasn't helped either.
I've attached the vi as it now stands. It is functional but hangs periodically. Any ideas?
Thanks for your help,
Jim
03-13-2007
02:01 PM
- last edited on
08-10-2026
09:12 AM
by
Content Cleaner
Hi Jim,
Thanks for reworking the code, but we're definitely at the start of the troubleshooting process. The first thing I'm seeing in this code is the potential for a lot of race conditions. Also, this code is still way to big to troubleshoot effectively. Rather than have large numbers of registers that you're performing the same/simliar actions on, you need to narrow it down to the smallest code that still produces the error. I also see where you've added the delays, but another good place would be in the while loop itself. Without timing, the loop executes as many times as it possible can, and will tie up CPU, but with timing, you allow the computer time to execute other actions (including things like the mouse moving).
Let me know how it goes!
Meghan
09-05-2008 01:25 PM
09-05-2008 01:58 PM
Every time which I try to make the communication I obtain the modbus error 6101.
09-05-2008 03:43 PM