Resetting a tag in Structured Text in Logix Designer

FelipeGarcia

Member
Join Date
Jan 2021
Location
ON
Posts
5
Hey!

I'm looking for a way to reset a tag when the routine that sets the tag is disabled.

For example:

Routine 1 has the following

If Tag1 then
Tag2 := 1;
Else
Tag2 := 0;
End_if;

And while Routine 1 was enabled, Tag1 was 1 (true) so Tag2 was also 1 (true). However, if Routine 1 is disabled, Tag2 stays 1 (true).

Any way of resetting Tag2 while Routine 1 is disabled without explicitly resetting it outside of Routine 1? Am I missing something?

Thanks!
 
Yes, you are missing the fact that the controller responds to your demands.

As to your problem, I would do it explicitly if the routine is not being called ....

2021-02-02_214847.jpg
 
Hey!

Thank you for your answer!

I understand that the controller responds according to what it was demanded to do. But it's a good reminder for everybody, including myself...

I also understand that explicitly reset the tag outside the routine is an option. However, my question was different. And maybe not clear enough.

I was wondering if there is a way to set up controller parameters to "operate" for structured text the same way as it does for sequential function chart when the Last Scan of Active Step -> Automatic reset is selected and there is brackets around the assignment symbol for a tag in a nested SFC routine.

Thanks!

SFC.png
 
I think daba answered this on another thread recently: call Routine_1 on scans when enabling bit is EITHER {1} OR {has a 0-to-1 transition (i.e. a falling edge)}.


I realize that is not exactly what is being asked.
 
Last edited:
I think daba answered this on another thread recently: call Routine_1 on scans when enabling bit is EITHER {1} OR {has a 0-to-1 transition (i.e. a falling edge)}.

Your memory must be better than mine if I did !

And I've highlighted your typo : 1-to-0 transition, although tbf you did say "falling edge".
 

Similar Topics

Does Rockwell still offer reset codes for old school Master Disk floppy's? In a bind and need to reset the activation disk soon and to be pointed...
Replies
9
Views
231
Hi, I recently installed 2 1783-NATR devices into two of our machines. The machines are pretty much identical, both having 1769- L24ER-QFC1B...
Replies
4
Views
302
How is it going y'all? So We have had a pesky problem with an EH 300 flow meter. We are using EIP to reset the totalizer, and for some reason the...
Replies
3
Views
797
MELSEQ "intelligent modules" configuration, programmatically resetting the CPU Hello. This is for the Mitsubishi experts, and thanks in advance...
Replies
5
Views
1,065
Hi all, is there an easy way to reset a user defined shift register to 0? i have a data type containing 8 bools for an array of 10 and would like...
Replies
12
Views
3,198
Back
Top Bottom