04-28-2010 02:31 PM
Hi,
I am using a linear stepper motor to apply loadings on samples, I need:
1. The motor can go forward to apply loadings continuously;
2. when the loading reaches a setting value e.g. 100 lbs, the motor move backwards to release the loading;
3. record the loading value during the whole process.
I can only realize the motor motions by sequence structure, but can not record data simutaneously.
I wonder if there is any way to realize this in one while loop.
Could anyone help me about this? Many many thanks!
04-29-2010 04:03 AM
You can achieve this using 2 Digital Output and a single while loop. See this
Guru
04-29-2010 07:41 AM
04-29-2010 12:23 PM
Hi,
I'd recommend getting rid of the sequence structure--was there any particular reason for having this?
For code structure, I would see some sort of state machine where you are loading the sample, and then checking the load value each iteration. Once it hits 100lbs, you could move into the unloading state. You could also incorporate the data acquisition into this. You could do this all in one while loop.
There is a template for a State Machine in the New>VI from Templates; I would recommend starting here.