Phil Duncan Posted November 9, 2009 Report Share Posted November 9, 2009 (edited) 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 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, PS Attached code is in LV 2009. Dynamic Bar Chart.zip Edited November 9, 2009 by Phil Duncan Quote Link to comment
Aristos Queue Posted November 9, 2009 Report Share Posted November 9, 2009 Yes, it is possible. I did something similar in this XControl. It should serve as an example for you: http://decibel.ni.com/content/docs/DOC-1180 Quote Link to comment
jgcode Posted November 9, 2009 Report Share Posted November 9, 2009 Greetings All, Hi Phil I posted the same question recently. It does work which is great news. Cheers JG Quote Link to comment
Phil Duncan Posted November 10, 2009 Author Report Share Posted November 10, 2009 (edited) 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 ) Edited November 10, 2009 by Phil Duncan Quote Link to comment
jgcode Posted November 10, 2009 Report Share Posted November 10, 2009 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 ) A fellow Aussie!! - Howdy mate!! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.