LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

latch delay feed back?

Hello,

basically I have a button which switches an output on a PLC. But the PLC can be controlled from somewhere else as well. So I read back that output to a LED. Works fine until there. But I also want that the button moves according to the state of the PLC. Means I switch ON, so my switch stays at On position and LED is on. As soon the PLC switches off, the switch goes back and the LED goes off. At the same time I have to be able to control the switch, means once it is On a need to be able to switch it of. By now I only can switch the switch if I set the bytes at the PLC, but not really on my front panel, it always falls back.

Cheers,

Steffen.
0 Kudos
Message 1 of 47
(5,936 Views)
Hi Steffen,
i think you have to set always the PLC Bytes to change the state. The advantage is that the PLC has the shown state. Your FP state falls back, because it will be overwrite from your PLC state and thats the reason why i think you have to change the state of the PLC.
 
Mike
0 Kudos
Message 2 of 47
(5,921 Views)

I misunderstood your question... I thought you wanted to know how to change the Front Panel switch in your VI to adapt to the PLC Status LED.

So since I did a  very simple example, I will leave it here.. 

Have a look at the attached example.  You can set the switch on the Front Panel (represented by the switch on the left), it will change the PLC Status LED.

The switch on the right is there for convenience for this example simply to simulate changing the Status LED externally.  You would need to provide an event which reads the PLC Status LED and sets the FP Switch according to its status..  I simulated this inside the Timeout Event.

Is this the type of scenario that you were looking for?

RayR

 



Message Edited by JoeLabView on 06-16-2008 08:30 AM
Message 3 of 47
(5,914 Views)
arr, its LV 8.5, I am at 8.2, can´t open it!
Thanks anyway.
Situation is basically like in the attachment, of course it does not work 😞

later,

Steffen
0 Kudos
Message 4 of 47
(5,889 Views)

Hi Steffen,

here it is for 8.0

Mike

0 Kudos
Message 5 of 47
(5,882 Views)
Thanks Mike for converting to LV8.0.
 
Steffen,
 
I would stay away from using Local Variables to "figure out" the state of the "other switch"...  Have a look at the example.
 
RayR
Message 6 of 47
(5,866 Views)
Thank you Mike!

But now comes the tricky bit: the LED just indicates the action. But actually, the External Settings button needs to be set as well, when I switch the FP switch.
For example: I switch the heater on with FP, set O0.0="1".
LED reads back O0.0, switches to "1"
FP stays on "ON".
Someone or something else (process) sets O0.0="0"
LED reads back O0.0, switches to "0"
FP goes back to OFF.
Process switches O0.0 back ON
FP goes back to ON.
I decide to switch FP OFF.
O0.0 becomes zero
LED off

and so on....
Cannot imagine a logic structure, maybe latch?

Cheers,

Steffen.
Cheers,

Steffen

0 Kudos
Message 7 of 47
(5,849 Views)

Isn't that what the attached example does?

Lemme check if Mike changed anything in the example..

0 Kudos
Message 8 of 47
(5,846 Views)

The converted VI to LV8 is the same as the original..  so maybe I misunderstood something.

Do you mean that if the FP button is set to ON, the LED becomes ON, but also the remote switch becomes ON?? If not, then I don't understand what is missing from the example.. 

Or are you referring to your code..  If so, can you post it?

RayR

Message 9 of 47
(5,845 Views)
yes, the remote switch also becomes on. Since I want to control the PLC. But at the same time the PLC would control the manual switch.

The whole code is pretty big, I try to extract only the necessary bits.

Later,

Steffen
0 Kudos
Message 10 of 47
(5,834 Views)