Latching bit equivalent in Function Block? Yaskawa Drive Works EZ

AutomationTechBrian

Lifetime Supporting Member
Join Date
Jul 2013
Location
St. Cloud, MN
Posts
669
I figured out a solution to a vfd issue... at least in theory. Yaskawa has a program called Drive Works EZ that you can have PLC-type functions programmed into their industrial drives. It's function block programming. I just started working with it tonight, and I'm not seeing how to create a "latching" bit, with a set and reset, like we have in ladder. Most of these blocks are similar to other software programs, but I don't work with FB enough to think how to create a latching bit. Maybe there's a "standard" block that I could be looking for. I'm exploring this software tonight, but my available time is starting to run out.

This is an overview of how my control solution works:

Set bit if:
1. "Reverse" terminal closed
2. Zero Speed
3. Run Enable bit is high

Reset bit if:
1. "Reverse" terminal open

I realize the software is probably a little obscure to expect a reply... but you guys have surprised me in the past.
 
Isn't a latch functionally very close to a Start/Stop? C.f here.



I don't know the equivalent in FBD, but in ladder this:


Code:
   Zero_Speed    Run_Enable        Reverse      Bit_To_Set
--+---] [-----------] [-----+-------] [-------------( )---
  |                         |
  |  Bit_To_Set             |
  +----] [------------------+
 
Isn't a latch functionally very close to a Start/Stop?

from an Allen-Bradley background the rung that you've shown would be better referred to as a "seal-in" construction ...

in Allen-Bradley ladder-logic a proper "Latch" arrangement would use the OTL (Latch) instruction to "turn it on" ... and the OTU (Unlatch) instruction to "turn it off" ...

the BIG difference (again, I'm talking about Allen-Bradley here) would be that the proper Latch arrangement is RETENTIVE ...

an example: ... suppose that a dangerous machine has been "LATCHED" ON (it's running) and the power to the plant goes OFF ... naturally, the machine goes off ... BUT ... when the power is eventually restored, the machine would come BACK ON again ...

an Allen-Bradley "seal-in" construction would not come back on ...

this effect is not always understood by beginner programmers ... they often use "latches" because the rungs are "cleaner" and easier to insert than seal-in rungs ... the programs that they write might work PERFECTLY well in normal day-to-day operations - but an unexpected "Go-To-Run" event can have disastrous ("lawyer level") results ...

along these lines - here's an older thread that I think you'll enjoy ... it's long - but it brings up a lot of important ideas ...

http://www.plctalk.net/qanda/showthread.php?p=71786&postcount=1
 
Last edited:
A lot depends on the platform, in some platforms you can adjust the range that is retentive, so only these stay on the others are reset on power up.
The other things that can be done is a first scan bit to reset any bit/word you require. another way is have a hold bit set to power up first scan then use the not hold bit in any output so an operator re-start is required.
 
in Allen-Bradley's syntax for Function Block Diagramming, either one of the arrangements shown below would be equivalent to a Latch/Unlatch construction ...

there are TWO of them because sometimes it makes a difference (a BIG difference) in how we would want the system to react if BOTH the ON button and the OFF button happened to be "made" (electrically conducting) at the same time ...

specifically, suppose that Bubba the operator is "mashing" both buttons at the same time ... do we want the machine to be ON - or do we want it to be OFF ???

that's the "Dominant" idea in a nutshell ...
.

set_reset.PNG
 
Yes in other platforms set is always before reset so if both inputs were true then it would always be false, some platforms also have both S/R and R/S in that order. or if you use the old way as separate SET or RST then for safety put the set before reset.
 
The retentive issue is a good thing to keep in the back of your mind (or the front;)).


It's really a matter of semantics That "design patterns" url (http://www.contactandcoil.com/patterns-of-ladder-logic-programming/) draws a distinction between a start/stop


http://www.contactandcoil.com/patterns-of-ladder-logic-programming/startstop-circuit/


Start-Stop-Circuit.png


which A-B semantics calls a "seal-in", and that page's definition of a seal-in:


http://www.contactandcoil.com/patterns-of-ladder-logic-programming/sealed-in-coil/



Sealed-in-Coil.png




that definition seal-in lacks a way to cancel itself, within it's own rung at least.
 
and while we're at it - we might as well add this item to the discussion ... in Allen-Bradley Structured Text programming for RSLogix5000 the following syntax is a RETENTIVE ASSIGNMENT ...

:=

specifically, the COLON character - followed by the EQUAL character ...

on the other hand, the following syntax is a NON-RETENTIVE ASSIGNMENT ...

[:=]

specifically, there are SQUARE BRACKET characters around the assignment ...

once again, here is a potential trap for the unwary if (when?) an unexpected "Go-To-Run" event happens to raise its ugly head ...

party on ...
 

Similar Topics

I have a program that was emailed by OEM out of Italy for adding a new conveyro to an existing line and 2 Photo eyes. the problem I am having is...
Replies
7
Views
2,334
I am latching and unlatching "result_Data_latch" bit within same rung. Will This copy/move instruction execute correctly??
Replies
4
Views
193
I am curious why my latches do not work and maybe someone here has some insight. I have created two AOIs. One AOI latches an output on (ON)...
Replies
5
Views
1,797
I'd like to get some feedback on the use of latching/unlatching relays. (Something I've never used in my limited programming experience.) I've...
Replies
15
Views
4,851
How get steady latched from HMI push button without doing any program in PLC for latching and after pressing second it is unlatched in connected...
Replies
4
Views
1,647
Back
Top Bottom