Bubble Level

Discuss issues and ideas you have to configuring displays with PowerVision
dberezowski
Posts: 65
Joined: Wed Sep 08, 2010 4:03 pm

Bubble Level

Post by dberezowski » Thu Jun 09, 2011 5:04 pm

One of our customers would like a bubble level displayed as it is important to know X,Y tilt of the machine.

Given that an image widget's x,y position cannot be set in real time I am unsure how to address this request.

A brute force method would be to perform a DrawCircle() on layer 2 but I am sure this would have a significant impact on performance.

Another method would be to create hundreds of lamp gauges and turn on whatever one is closest to the actual x,y position. I can imagine that this would consume gobs and gobs of memory and probably worse than calling DrawCircle().

Any ideas?
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: Bubble Level

Post by ksaenz » Fri Jun 10, 2011 8:58 am

You can change the position of an image widget with a state mahine.

Put the position you want in the variables "UserDefinedVariable.Screen.MovePosX" and "UserDefinedVariable.Screen.MovePosY"

Execute the action "Screen->Move()"

Execute the action "Screen->Process()"

Regards,

ksaenz
dberezowski
Posts: 65
Joined: Wed Sep 08, 2010 4:03 pm

Re: Bubble Level

Post by dberezowski » Fri Jun 10, 2011 9:27 am

How do I specify which image widget I am changing the x,y position of?

Can I also do this with a script?

Can I also do this with a C++ program?

Thanks,
David
ksaenz
Enovation Controls Development
Enovation Controls Development
Posts: 263
Joined: Thu Aug 19, 2010 7:53 am

Re: Bubble Level

Post by ksaenz » Fri Jun 10, 2011 10:00 am

When you add the Move() action to the state you will be able to select the image widget from the Data column.

You could use sendEvent() from a script to cause a transition to a state that executes the Screen-> actions.