FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

FPAdvise terminated flag not working

I'm developing a FieldPoint application which has loop pairs (write & advise) for the output devices and single loops for the input devices (advise), similar to the FieldPoint DemoBox2 example downloaded from the NI web site.

I've recently seen a problem if I run the program for extended periods (ie overnight, 16/17 hrs. This application will be running for days on end). On terminating the app some loops won't stop, specifically the loops that are stopped by the "terminated" output of the FPAdvise vi. If I use the Abort button on the Tool bar I get a "Resetting vi " message which won't clear and I have to terminate LabView. The app ends properly for runs up to about 6/7 hrs. I've seen the discussion thread on the Resetting
vi message and balanced Open/Close VI Ref calls and don't think this applies as I don't call Open or Close VI Ref.

It looks to me that FPAdvise might not be operating properly.

Any suggestions? Is it acceptable to terminate the loops with local variables from the stop button (as I do with lots of other loops in the app) or is there anything I should be aware of by not using the FPAdvise "terminated" output to stop the loop?

Thanks,

Niel.
0 Kudos
Message 1 of 5
(3,905 Views)
Niel,

The "terminated" output from FP Advise will go true if and only if a FP Close.vi is called to shut down the FieldPoint Server. If the FP Close.vi is following one of the loops that has the FP Advise.vi, you will never close the server and thus never exit the loops (snake eating it's own tail type syndrome).

Regards,
Aaron
LabVIEW Champion, CLA, CPI
0 Kudos
Message 2 of 5
(3,905 Views)
Thanks Aaron,

My FP Close vi is outside 1 of the loops containing a FP write vi and the 'stop button'. So if I hit the stop button this loop terminates and FP close is called. All the other loops are either terminated by local copies of the stop button or the FP Advise "terminate" output. What happens is that all the loops with the 'local var stop' end ok but the other loops keep executing. I see what you're talking about if the FP Close follows a FP Advise loop, but this is not the case. It also doesn't explain why the app will stop normally after a few hrs but not if it runs overnight.

Is it safe/good practice to close the FP Advise loops with the same 'local var stop' as I'm using for the other loops?

Regards,

Niel.
0 Kudos
Message 3 of 5
(3,905 Views)
Niel,

It is fine to close the FP Advise loops with the same local variable as your other loops. What version of FieldPoint Explorer are you using so I can try and replicate this problme?

Regards,
Aaron
LabVIEW Champion, CLA, CPI
0 Kudos
Message 4 of 5
(3,905 Views)
Hi Aaron,

I ran the app overnight having OR'd the FP Advise terminate and the local stop var to the while loop condition terminal and lo, all the loops stopped. I probed all the FP Advise terminate wires and the stop var wires and interestingly the FP Advise terminate outputs were True using this approach. It was running for a slightly shorter duration (16 hrs vs 18 hrs) so not sure if this is a borderline for the problem showing up.

I'm using FP Explorer 2.0.4, Firmware 3.00, LabView 6.0.2 and NT4.

I've attached some stripped down code to show the general approach I've taken. As I said in a previous post I've based my code on the FP DemoBox2 example from the NI web site.

Regards,

Niel.
0 Kudos
Message 5 of 5
(3,905 Views)