07-16-2007 05:59 AM
07-16-2007 06:43 AM
07-16-2007 07:35 AM - edited 07-16-2007 07:35 AM
Hi Derek,
In this thread I posted the design of an application in powerpoint.
Slides 41-45 detail the "I/O status" Action Engine (functional global) which was designed to share the state of the systems I/O to multiple clients in manner that is similar to the file and DAQ I/O that comes with LV.
Note: If you down load the ppt there are notes included for each slide.
I hope this helps,
Ben
Message Edited by Ben on 07-16-2007 07:36 AM
07-16-2007 07:54 AM
1)My application can cope this, I've put a while loop round the whole sub-vi and wired it's control terminal to a constant, when the 'Zero' boolean input is true I write the current value to my shift register. the rest of the time I subtract the shift register from my current reading. Seems to be working ok, for now at least.
2) Interesting question, I've come from a C, C# background and I guess what I was trying to mimic was this....
The Re-entrant VI is my 'class' every time I wish to construct a new instance of that Class I put down another re-entrant VI allowing me to re-use the wiring diagram but each instance has it's own data stored between calls in shift registers.
Am I abusing the re-entrant VI property by doing this? Think I'm caught a bit in the, learning something new(Labview) but still having to get things working
07-16-2007 10:14 AM
Do you have a known number of instances in your application, I assume you are tyring to emulate classes on OOP. You might consider using a template vi, where your application will create (open a copy of the vi) and then you can reference the vi in your application. This is not too easy and requires managing names of the instances but so does OOP.
Paul
07-17-2007 07:27 AM