LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Webserver and Control Disable/Enable Property

Preface Details:

LV2009 - Application running on cRio-9074

Using Websrever to Access Remote Front Panel

 

 

Problem:

If I close the Browser (or hit refresh) the controls default to their initial disable/enable property state even though they have been changed in the code.  Works fine though when running FP inside LV.

 

Details:

Initially when the code starts "Button A" and "Button B"

I have a front panel where you press button A, you transition to a "Data Acq Mode" state (state machine paradigm).  When you enter the Data Acq state by pressing Button A, my code disables Button B as it can't be used during Data Acq. 

 

So with Data Acq running, you close the browser, or hit the refresh button for some reason.  When the panel comes back up, it is still in the Data Acq mode and running as it should be.  Control VALUES are as they all should be, BUT.....   "Button B" is enabled, no longer disabled  (as if it went back to its default property values for the VI)

 

This only happens in the webserver implementation.  The one work around that I can think of....  I write "disabled and grayed out" to Control B's property node at the state transition.  I could continuously write to it in the loop inside the Data Acq state, but this seems a bit absurd.

0 Kudos
Message 1 of 5
(3,415 Views)

THe Webserver inteface is implemented in a manner synonomous with how LV operates at run time with the BD code and the FP being unique and seperate.

 

When a connection is made a version of the FP is created and run on the client side that talks to the BD for updates etc.

 

So the FP your user interacts with does not exist before the connection is made so any properties update made to the FP are simply unknown to the clients FP.

 

Solution:

 

Refresh the FP setting one time when the client side starts-up.

 

Reflections:

 

TO avoid this situation, any webserver enabled FP would have to cache ALL changes made from the time the app started up to the time the connection is made in order to ensure the FP looks the same as the FP on the local machine.

 

In the interst of performance, I am GLAD it was implemented as it was.

 

I hope that helps,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(3,408 Views)

 

 

Thanks for the quick/good input.  Can you expand on:  "Refresh the FP setting one time when the client side starts-up."

 

Are you saying programtically watch for a client side connection and then set the disable/enable property based on the current state?  How do you do this webserver FP panels?

 

(I don't think/hope you mean tell the user not to refresh or not to close the browser after the start-up.  This would cause a problem as this systems runs for weeks and I can't rely on the browser being opened or the client actually being connected for all that time.  Need the c-rio to run autonomously and the user to be able to "check-in on it periodically".)

0 Kudos
Message 3 of 5
(3,401 Views)

bradh wrote:

 

 

Thanks for the quick/good input.  Can you expand on:  "Refresh the FP setting one time when the client side starts-up."

 

Are you saying programtically watch for a client side connection and then set the disable/enable property based on the current state?  How do you do this webserver FP panels?

 

(I don't think/hope you mean tell the user not to refresh or not to close the browser after the start-up.  This would cause a problem as this systems runs for weeks and I can't rely on the browser being opened or the client actually being connected for all that time.  Need the c-rio to run autonomously and the user to be able to "check-in on it periodically".)


Well I never did it myself (I work with one of the largest concentrations of CLA's in the world and I support them when they run into complications).

 

In the app my partner was working on he new there was a new connection because of valid login completing. I believe he used an Action Nengine to manage the FP GUI so he just had to hit it with a "refresh" method.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 5
(3,391 Views)

 Ben,

 

Some more searching and I found the fix based on your suggestions here.....

 

 

http://forums.ni.com/ni/board/message?board.id=110&message.id=6805&requireLogin=False

 

 

It looks like I am going to make a loop that watches for the client connection and then updates control properties based on the state of the VI.

 

Thanks

 

Message 5 of 5
(3,377 Views)