11-30-2009 11:54 AM
Hi,
________________________________________________________________________
I have no idea which is the "Start/Stop" case structure.
_______________________________________________________________________
Like I said, I have not included the case structure here. The case structures shown in the code is for the communication part. For each command read, a particular case runs. The Start/Stop control on the top inside the while loop is a Start/Stop control that when pressed runs a Huge case structure (which in this case is represented as a Start/Stop LED ). The huge case structure that I am talkin about is also inside the while loop. So, the property nodes that I have used is to signal the value to the Start/Stop control to enable the appropriate case structure.
_______________________________________________________________________
There are 4 cases, but none are labeled, so only you know what they are.
_________________________________________________________________________
well, the above case is to run when a command is read and the below case is to run when a status request is read.
______________________________________________________________________________
Do not initialize the serial port inside the loop. This should be outside the loop.
_________________________________________________________________
ok got it. So just the VISA configure block should be outside the while loop?
_______________________________________________________________________
Why are you using Mathscript for trivial calculations? They incur a ridiculous amount of overhead for something that can be done with a comparison function and a Select function.
________________________________________________________________________
This was the simplest way i knew to do it (me being new to LabVIEw and stuff). I have done it for now. Looking to better the code as a pro would do. But, that would take time and experience now wouldn't it. 🙂
__________________________________________________________________________________________________________
I don't understand what you're doing with controls/indicators of the same name. This is confusing. Is somebody supposed to look at the control or the indicator? It appears in the code that you are writing to the controls through property nodes, and you're simply writing to the indicator directly from the control. This is pointless. Even more pointless is reading an indicator's value via a property node and then writing the value back using the terminal! Do you just like to use up CPU time?
_________________________________________________________________________________________________________
The Indicators are representations of case structures in the program (*** I haven't shown them in the program ***) . This is just a simulation. I am doing this for a reason (It being not pointless 🙂 ).
Command read -> property node signals the control -> signaling control starts the case
And of course I have to use CPU time to run the program but not use ""UP"" 😉
________________________________________________________________________________________________________
You really should consider using a state machine architecture.
______________________________________________________________________________________________
Have heard of this, but never used it. PLease provide resources/examples if you can.
__________________________________________________________________________________________________
EDIT: Additional comment: Anything that holds
up code for 18 minutes is a clear mark of a bad design/implementation.
You should not have anything that blocks code for that amount of time.
__________________________________________________________________________________________________
Well, according to the requirement, 18min it is. It is not holding up, there are 6 stages to run, each of which is 3 minutes. It is not bad design, the test is to run for 18min. What I want to know is why does Serial communication break (or more like pause) until that is done. The reason I need to know this is because I have values (Speed and elevation feedbacks) out of the 18min case structure that have to be written to the Serial port as Status acknowledgements.
Phew!!! Big post..... Thanks guys!!
V
12-02-2009 11:42 AM
12-02-2009 12:43 PM
12-02-2009 01:29 PM
Hi VJAY,
Reading the discussion thread regarding the treadmill communication I had a question. I worked with a Senior Design Project (10+ years ago at SDSU ) and used LabVIIEW. The project was to communicate with a super heavy duty treadmill that was used for enhanced accelatered traning. The questions you raised. Is this treadmill used in enhanced traning?
Just Curious.
12-02-2009 03:06 PM
Thanks smercurio_fc!!! 🙂
Can I define the VISA configuration within the 18min case structure? the Serial communication part is outside the 18min case structure that I am talking about currently. Will it continue communication if I create a VISA serial module inside the case structure? And once the case ends, it will transfer control back to the outer serial communication module....
V
12-04-2009 12:40 PM
oh never mind..!!! I got it working by using parallel while loops and now works brilliantly... I m almost done wit this project... wooo hoooo !!
Thanks guys!!
V