02-22-2018 12:07 AM
I am Using An IR Sensor and USB 6221 To open or close Pneumatic cylinder.
I did that Vi in attachments .. It is working good until i use the delay time in the second frame of flat sequence.
Without Delay It works good but it opens and closes too fast .. i need it to stop a little time before it closes
With Delay it makes the values which are read from the sensor are not accurate so the program isn't working well
So the question is
only what I need is a stop time between the two phases not a delay for the whole program
02-22-2018 12:54 AM
Hi El-Awny,
only what I need is a stop time between the two phases not a delay for the whole program
You need more than this!
- Get rid of the race conditions you created with those local variables! THINK DATAFLOW!
- Think about the concept of a state machine…
- You surely will only need one of those DAQAssistants to open AND close the cylinder!
- DAQmx is really easy to use - after reading this and looking at the example VIs coming with LabVIEW…
02-22-2018 08:24 AM
Thank You for the reply but can explain more how to get over this problem
02-22-2018 08:35 AM
Hi El-Awny,
I am Using An IR Sensor and USB 6221 To open or close Pneumatic cylinder.
So you could create two loops: one for reading the sensor and one for handling the digital output.
With Delay it makes the values which are read from the sensor are not accurate so the program isn't working well
With two separate loops they can operate independently!
It is working good until i use the delay time in the second frame of flat sequence... i need it to stop a little time before it closes
Here comes the state machine: you could use 3 states of [open, wait, close].
In the wait state you could also check for changed sensor values…