Jump to content

XControl with it's own dynamic VI


Recommended Posts

Greetings All,

I have been working on a relatively simple XControl for a project we have atm. Right now it is a simple single ended Bar graph with some alert features. The user can specify the upper and lower limits of the range, a warning threshold, an alarm threshold and a warning time. This is version 0.1 of the final XControl which will have a lot more functionality including double ended (bi-directional fill) display options.

Operation:

If the data value is in the warning range, the BG colour of the bar chart turns orange

If the data value is in the alarm range, the BG colour of the bar chart turns red along with the BG colour of the numeric indicator under the graph.

If the data value is in the warning range for more than the warning time limit (default = 2sec), the BG colour of the numeric indicator turns red.

After setting up all the panel resize and scaling issues :frusty: I have finally implemented some of the operating logic. Because the XControl involves some timing functionality (essentially a stopwatch), I decided to use VI Server to call a dynamic (stopwatch) VI. I tested the XControl and it works exactly as expected, until..... I added a second bar graph XControl to my tester app "PLAYTEST Bar Chart.vi" only to find that each XControl is messing with the same stopwatch VI. I have tried all combinations of re-entrancy settings and read plenty of posts about re-entrant VI and data spaces etc, frankly I am more confused now than I was before.

What I need is to have each instance of the XControl talk to it's own stopwatch VI. Is this possible?

Cheers & Beers,

:thumbup1::beer_mug:

PS Attached code is in LV 2009.

Dynamic Bar Chart.zip

Edited by Phil Duncan
Link to comment

Thanks for your replies.

I have since re-structured the XControl and now it performs as I would like although there are still a few bugs. I will review your submissions in detail as I am sure they will shed some light.

Cheers & Beers (particularly cold ones given the current heatwave in Adelaide :))

:thumbup1::beer_mug:

Edited by Phil Duncan
Link to comment

Thanks for your replies.

I have since re-structured the XControl and now it performs as I would like although there are still a few bugs. I will review your submissions in detail as I am sure they will shed some light.

Cheers & Beers (particularly cold ones given the current heatwave in Adelaide :))

:thumbup1::beer_mug:

A fellow Aussie!! - Howdy mate!! :beer_mug:

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.