FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel indicator value disappears

Hi all !

I have a compiled program running on a cFP, I access this program through a web page hosted in the controller, all is running without problem since a long time
recently I added local variables from some numeric indicators on the front panel to uses those values to compute a simple calculus, I used local variable essentialy to simplify wiring, all those items are in the same real time loop
since this modification the 4 indicators indicates 0.0 but the result of the calculus is correct
so the value is present but the reading disappears
I tried with property nodes to read the values and the problem is the same except that the value isn't 0.0 but another number that is not the right one !
any idea ?
of course this isn’t critical, I can put wires and the problem is solved

but I'd like to understand why
and it's not esthetic 😜

regards

 

0 Kudos
Message 1 of 10
(7,307 Views)
Hi thieumat,
  
   I agree with you when you say that you'd ike to understand this behavior, so go on with debug, but.... most labview gurus will tell you to avoid this practice: never use local to simplify wiring!  Instead, use good wiring techniques (dataflow left to right, group related data in clusters to simplify block diagram and readability, put subvi connections on the same places, etc....).  Good wiring technique is aesthetically more beautiful than local, and it's more readable.

   A part from this, the problem with local is possibility of race conditions: the program still works, but not in the way you meant it.  How are you saying that the calculus is correct? Are you opening VI on cFP in debug mode?

   Maybe you can post your code? Or just a snapshot of a part of it....

   Have a nice day!

graziano


  
0 Kudos
Message 2 of 10
(7,302 Views)

well I know that the calculus is correct because I know what values are used even if they aren’t printed on the front panel
I was most asking if this is a specific problem of the platform or the webpage interface because I never experienced this kind of problem with local variable on a classic front panel interface, if they are well employed of course.
thank you for your answer

0 Kudos
Message 3 of 10
(7,290 Views)

You say you are running a "compiled" program on the cFP.  Does that mean you turned it into an .exe?  How are you viewing the front panel?

I may be mistaken, but I thought that the front panel of a compiled program on a cFP is not updated since a cFP is designed to be a headless system without a User interface.  I did a search on the forums and came across this link.

Message 4 of 10
(7,287 Views)

excuse me I don't really compile, I made a build and then I access the startup vi trough the web server.
the interface is not as good as a standard vi front panel, I think the refresh rate of the page is a bit too slow, but it's a really easy way to access indicators and controls of the program on the RT target, you can find more information here

0 Kudos
Message 5 of 10
(7,267 Views)

Hello!

It is expected to work like that and is described in more detail here:

http://digital.ni.com/public.nsf/allkb/FC5024A5DD6344C886256C8C0054689B?OpenDocument

Hope this helps!

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 6 of 10
(7,232 Views)
thanks a lot, now I understand 😜
0 Kudos
Message 7 of 10
(7,219 Views)
I have the problem that I update properties on my front panel during initiation (visible, maximum data value etc).
The problem is that the webinterface seem to remember the settings I had on my computer when I created it. So, if a value was max 5 when I created the web interface then the web interface locks it to max 5 as default regardless. I then have to run a update on the maximum property to change this.
 
Updating properties is very cpu intensive though, so I can't do it all the time.
 
Is there a way to detect that someone just opened a web interface?
Is there a way of automatically synchronising the web interface to match the "internal" state of the vi (I guess not - that writing to a property when the interface is not present will have no effect).
 
This "remembrance" functionality has given me a lot of headaches before I understood what happened - anyone with good tricks to get around it?


Message Edited by Rodnebb on 02-21-2008 03:09 PM
0 Kudos
Message 8 of 10
(6,944 Views)

Hello Rodnebb!

You can check if a user is logged into your webserver through remote panels programmtically using the method called 'Remote Panel:Client Connections'. It will return an array of clusters containing connection information about the clients viewing or controlling the VI.

So when a user requests to view it from a web browser you will get info such as the IP address of the machine accessing it.

Look at the example called 'RemotePanelMethods-Server VI' in the labview\examples\remotepanel directory where this method is used. Hopes this helps!

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 9 of 10
(6,941 Views)
Thanks for a quick reply.
Another thing: it seems like I can 'sensitize" controls by first updating the control with the value property. Then, when I just write to this control (local variable etc) it will start to update. Does anyone know what is happening? Can  I trust this 🙂 ?
0 Kudos
Message 10 of 10
(6,939 Views)