LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Program lost part of functions after 1.5 month?

harry,

 

Now that we can see more of your code (NICE clean-up but it is not quite "software" yet but, "functional code" is worthwileSmiley Wink)

 

If you replaced an old tradtitional DAQ "Wait +(mS) with CCI Delay.vi you are golden.  The old DAQ "Wait (mS).vi does have a known issue of entering an infinate loop when the millisecond timer rolls over.

 

A millisecond timer is just what it sounds like-  It counts the number of milliseconds since the core was restarted up to the maximum value of a 32 bit signed integer (about 49 days) and then it starts at 0 again.  So if you start a wait for "x" mSec after Rollover-"X mSec before" rollover you can't get there (And Wait (mS).vi never exits)  You have seen this before! Wait (mS) is the exact same code when compiled as a C "Sleep" instruction.  Your IT dept will tell you to log off at the end of the day (and they will push "Fixes" that force a reboot at least once per month) so you never see this in managed IT environments.

 

Coffee smells wonderful! unless it is poured hot into your lap.  sorry you got burned


"Should be" isn't "Is" -Jay
Message 21 of 53
(1,161 Views)

Lynn, you are definitely correct about improving my program architecture. Apparently I need learn more to be able to do something like you mentioned. Thanks for your suggestions!

 

Harry

0 Kudos
Message 22 of 53
(1,129 Views)

Raven Fan,

 

Thanks for your example! I already removed the tick count functions based on other suggestion, that's why you didn't see it. Thanks!

 

Harry

0 Kudos
Message 23 of 53
(1,129 Views)

Jeff,

 

Thanks for your explaination. Yeah I agree this is definitely not a software, but rather just a piece of code. I'm happy as long it works! 🙂

 

Anyway I will take this as my fix for now and will update you guys next couple of months how it goes. Hopefully I don't have to report the same problem again... Smiley LOL

 

Rgds,

 

Harry

0 Kudos
Message 24 of 53
(1,123 Views)

Jeff,

 

I still kind of wonder why this timer issue can cause my Analog Inputs not working. When the problem occurs, all the Analog Inputs show "N/A" instead of current values (when operating normally, the values shown range from 4mA to 20mA). Does this make sense to you? Why no error message shows up? Any thoughts?

 

I just want to rule out all possbilities (probably not gonna happen but at least i tried). Thanks!

 

Rgds,

 

Harry

0 Kudos
Message 25 of 53
(1,098 Views)

Lookong deaper there may be other issues.  If Wait +(ms) hung the while loop would not iterate at all

 

On the oter hand if that AI task is contiouos acquisition you could get to a point where your buffer overflows you might not notice the error since your error is on a tunnel and not a shift register.


"Should be" isn't "Is" -Jay
0 Kudos
Message 26 of 53
(1,097 Views)

Jeff,

 

So for #1, the CCV delay vi should take care of the issue, right?

 

For #2, I didn't quite get it. Is there a fix for that?

 

Thanks

 

Harry

0 Kudos
Message 27 of 53
(1,084 Views)

@Harry.W wrote:

Jeff,

 

So for #1, the CCV delay vi should take care of the issue, right?

 

For #2, I didn't quite get it. Is there a fix for that?

 

Thanks

 

Harry


Is th AI Read Contineous? or is it configured to read x number of samples then STOP acquiring until you ask for more?


"Should be" isn't "Is" -Jay
0 Kudos
Message 28 of 53
(1,078 Views)

Jeff,

 

"Overflow" scares me!  How can I avoid the potential buffer overflow you mentioned here? Or is there a way to monitor buffer usage?

 

Do you mean I should put the error aslo as a shift register? Initially I don't even have a shift register for the task but someone suggested me to put there saying it will make sure I read and write the most latest data.

 

Forgiving my ignorance, but wouldn't shift register keeps storing more and more data? Do i really need it?

 

Thanks!

 

Harry 

 

 

0 Kudos
Message 29 of 53
(1,077 Views)

Jeff,

 

At the moment, I actually read only 10 number of points each cycle. I thought the old version I used default value "-1" which should acquire 100 points every time.

 

Harry

0 Kudos
Message 30 of 53
(1,075 Views)