05-08-2009 08:41 AM - edited 05-08-2009 08:48 AM
Peter,
Use shiftregister to store data. Additionally, i doubt that your "analysis algorithm" performs the functionality you need......
hope this helps,
Norbert
05-08-2009 09:43 AM
Thank you for your replies, the default tunnel was indeed the issue. So I've got a solution using local varaibles.
It is not ideal in the fact that the comparison isn't automated. You click to read high and low pressures, then click categorise and it passes the values into the comparison section.. more comparisons are to be added although this is easily achieved.
Peter
05-08-2009 09:54 PM
PjayD wrote:
The case stucture over the whole project is so that the program can be initialized by clicking the "Start.." button, rather than using the run button. Additionally I don't have (or know how to obtain) any code for this.
No. DON"T use the Run Continuously button which is what your screenshot shows. (Also, please attach image files to your message rather than posting them on a 3rd party webserver)
You are probably forced to use the Abort button to stop your code.
As Harold says, normally there is a while loop around all code that is intended to be kept running. Then there would be a nice stop button located on the front panel that will end the master while loop nicely. Put a small wait statement in that while loop so it doesn't spin the CPU at full speed while waiting for the start button to be pressed.
Also as Harold said (and he seems to be learning quickly now,) a structure that uses an event structure would be better to handle the button presses along with a state machine.
05-08-2009 10:13 PM
05-08-2009 10:57 PM
05-11-2009 04:12 AM
05-11-2009 11:32 AM
PjayD wrote:Thank you for your replies, the default tunnel was indeed the issue. So I've got a solution using local varaibles.
You should avoid Local Variables. They are a quick and very dirty solution that will cause you and anyone working with the code too many headaches in the future.
I didn't read all posts, yet.
So the high & low pressure relate to Systolic & Diastolic pressures. Then you should have indicators with their appropriate names. Do you actually want to measure one or the other, but not both? That would be unusual.
... I'll keep reading ...
05-11-2009 12:22 PM
05-12-2009 09:43 AM