LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing in Case statements

I'm having a problem where I need to turn an output on for a short period of time (500ms) after which the actuator is turned off. Currently I have case statements that determine whether or not to turn the actuator on and that operatate on a 500ms delay. This however is causing the program to miss other events that are occurring in the system. Is it possible to implement a delay like this without interrupting program execution. Perhaps, finding the time when the condition is met, and then compare the elapsed time from that moment to the required time in order to turn off the actuator? Thanks in advance. copy of the program is attached
0 Kudos
Message 1 of 10
(3,456 Views)
I have a similar problem!

So you'll be helping two of us out if anyone is kind enough 😄

Edit: In fact, i'd hazard a guess that you're coding something for possibly the same thing as me? Byrtronic? The similarities are uncanny!

Message Edited by Michael Burgess on 03-24-2005 11:22 PM

0 Kudos
Message 2 of 10
(3,448 Views)
I am in fact. Writing a controller for the Industrial Control Trainer (ICT1). Wrote a PLC controller and now trying to implement more robust control in LabVIEW using DIO card as part of thesis work.
0 Kudos
Message 3 of 10
(3,442 Views)
What Country / Uni?
0 Kudos
Message 4 of 10
(3,437 Views)
Iowa State University (USA) How about you?
0 Kudos
Message 5 of 10
(3,433 Views)
Staffordshire, UK

I thought you were the other guy doing the ICT1 @ my uni - he has done PLC and Labview - got me thinking!

Yours is radically different to mine I must add!

Saying that, I'm having real performance issues with mine - late reactions to events are causing me to drink more cups of tea than is healthy!
0 Kudos
Message 6 of 10
(3,429 Views)
I took a look at yours and didn't get much out of it, kind of new to LabVIEW as you can see from my spaghetti code and the attachment I provided isn't the one I wanted, CPU has been acting up. The problem that I'm having is that I need to turn on the actuators for a short period of time and not miss the other sensors turning on and off etc. Need to find a way to keep track of time without stopping executions outside of those areas.
0 Kudos
Message 7 of 10
(3,426 Views)
In my thread, someone suggested a state machine and a way of causing a pause without the use of a delay, which, as you say puts a lag in and affects the performance of the rest of the system

I can't work with such a big block diagram - I need to approach it in small subsections so as not to get bombarded visually!

I could do with some clues on the inspection area!

I've got it to recognise plastic tops easily on the Capacitive Proximity Detector and the Infra-Red Reflective Sensor, but the section before is causing me grief. I have used some boolean logic to say 'if the inductive sensor goes from false to true, and then the infra-red through beam goes from false to true THEN it's a metal object that is passing - this would be fine BUT the code iterates so quick with my shift register that false to true is recognised, but then it iterates again too quickly and true to true is picked up and provides false, so it doesn't then think the object is metal when the infra-red beam is broken

so I need a way of saying

If F->T Then True
If T->T Then True
Else False

any good with Boolean Logic? 😄
0 Kudos
Message 8 of 10
(3,419 Views)
The last post in this thread may be of use.

http://forums.ni.com/ni/board/message?board.id=170&message.id=113302#M113302

no ideas spring to mind. I don't know your objective using the plant but if I were trying to identify if a part is ring or peg, I would use the capacitive area sensors. If reflective and not capacitive sensor, then part is peg. That's how i did it in PLC.

Curious, Are you grad/undergrad? And isn't it getting late across the pond
0 Kudos
Message 9 of 10
(3,417 Views)
I'm an undergrad dude

Final year of BSc(Hons) Computing Science

RE the inspection area

the way you mention is not robust enough

all that means is that the passing item does not have a plastic top

you need to say 'if INDUCTIVE and THROUGH BEAM then METAL BASE' - and 'if NOT INDUCTIVE and THROUGH BEAM then NOT METAL BASE so REJECT'

then pass the status of that on to the next inspection area and say

'if CAPACATIVE and IR REFLECTIVE then PLASTIC TOP' and 'if NOT CAPACITIVE and IR REFLECTIVE then NOT PLASTIC TOP so REJECT'

using these two outputs, you know if you have a metal base and a plastic top and can set the reject output accordingly

that's my take on it anyhow!
0 Kudos
Message 10 of 10
(3,411 Views)