Function Block Studio 5000 help!

Foxtrot2050

Member
Join Date
Feb 2024
Location
OHIO
Posts
18
Please see attached file. I need this program in Function Block form but I am totally lost on this. Any help would be appreciated.

Thanks!
 

Attachments

  • 11.png
    11.png
    87.8 KB · Views: 60
I'm not an FBD expert by any means, but how about this? I tested it in a 1769-L33ER at v34.11 and it seems to work. My initial mock-up was in a 5069-L320ER (also at v34.11) but the instructions look different. I think I prefer the newer version (below).
FBD_Lights.PNG

In a 5069 program:
FBD_Lights_5069.PNG

I set the timer PREsets by clicking on the "..." buttons.
 
@joseph_e2 what about attached? Would love your opinion/guidance. I have a structure but they way I'm doing it isn't working correctly in Function Block Diagram. Also cant find the RESETS? Cheers!🍻
 

Attachments

  • fb.png
    fb.png
    34.1 KB · Views: 16
Do you have access to FBD in Logix5k? I've never used it before, so it's all an experiment for me.
In LAD, you can reset a TON in 2 ways: with a RESet instruction or by disabling the rung-in condition. Either will stop a TON's timing. A TOF behaves differently. An RTO can only be RESet with a RES instruction (or manually manipulating the ACC and DN bits, but you probably shouldn't be doing any of that in general...).

In other words....in the original LAD code, the lights will turn on in sequence and stay on until Stop_Button is activated. If you only want one light at a time, try this:
Remove REDLT from rung 1 and use Virtual_Relay to drive RedTime.
Use RedTime.TT to turn on REDLT in rung 0.
Use RedTime.DN to run GreenTime in rung 2 and GreenTime.TT to turn on GREENLT in rung 0.
Use GreenTime.DN to run WhiteTime in rung 2 and WhiteTime.TT to turn on AMBERLT in rung 0.

After the timers are done, the lights will all be off until Stop_Button is pushed and then Start_Button is pushed. If you want the timers to "self reset", add "XIO WhiteTime.DN" where you already have "XIO Stop_Button". That will drop out Virtual_Relay, which will drop the EN to RedTime, which will turn off its DN bit, which will cascade down and reset the other timers. Then, the system will be ready for another run with Start_Button.

In FBD...I'd have to tinker with it some. First thing I'd try is to precede each LT with a LES instruction comparing its corresponding timer's ACC to its PRE. That may not quite work, though. Then I'd add WhiteTime's DN signal with a NOT to BAND_01
 
Last edited:
Do you have access to FBD in Logix5k? I've never used it before, so it's all an experiment for me.
In LAD, you can reset a TON in 2 ways: with a RESet instruction or by disabling the rung-in condition. Either will stop a TON's timing. A TOF behaves differently. An RTO can only be RESet with a RES instruction (or manually manipulating the ACC and DN bits, but you probably shouldn't be doing any of that in general...).

In other words....in the original LAD code, the lights will turn on in sequence and stay on until Stop_Button is activated. If you only want one light at a time, try this:
Remove REDLT from rung 1 and use Virtual_Relay to drive RedTime.
Use RedTime.TT to turn on REDLT in rung 0.
Use RedTime.DN to run GreenTime in rung 2 and GreenTime.TT to turn on GREENLT in rung 0.
Use GreenTime.DN to run WhiteTime in rung 2 and WhiteTime.TT to turn on AMBERLT in rung 0.

After the timers are done, the lights will all be off until Stop_Button is pushed and then Start_Button is pushed. If you want the timers to "self reset", add "XIO WhiteTime.DN" where you already have "XIO Stop_Button". That will drop out Virtual_Relay, which will drop the EN to RedTime, which will turn off its DN bit, which will cascade down and reset the other timers. Then, the system will be ready for another run with Start_Button.

In FBD...I'd have to tinker with it some. First thing I'd try is to precede each LT with a LES instruction comparing its corresponding timer's ACC to its PRE. That may not quite work, though. Then I'd add WhiteTime's DN signal with a NOT to BAND_01
@joseph_e2 this is actually different code in attached only the Green and Red lights are used in this one. I only have access to FBD in 5K during my break times. The structure you did for my first code worked perfectly was just wondering how you would do the new one. Thanks!
 
@joseph_e2 this is actually different code in attached only the Green and Red lights are used in this one. I only have access to FBD in 5K during my break times. The structure you did for my first code worked perfectly was just wondering how you would do the new one. Thanks!

Restate the ladder logic as prose IF-THEN statements. That should make it easier to convert to FBD. E.g.
  1. IF (start is pressed OR virtual_relay (seal-in) value is 1) AND (NOT stop is pressed) AND (count is not done) THEN (write value of 1 to virtual_relay)
  2. IF (virtual_relay value is 1) and (red timer is not expired (.DN)) THEN (run red timer)
  3. IF (red timer is timing (.TT)) THEN (turn on red light)
  4. etc.
 

Similar Topics

I am trying to setup the TOT function block so that I bring in GPM and want to output MGD. I cannot seem to figure out the correct gain in the...
Replies
16
Views
2,716
Greetings, this is the first FB programming I've done. It is running a totalizer from a flow transmitter. the routine is being jumped to...
Replies
25
Views
5,200
Am I losing it? Is it not possible to COP a UDT to another UDT in a function block routine? PLEASE HELP!
Replies
4
Views
1,542
Hi there, I have been using ladder logic for quite some time on a variety of AB products. I've switched to function block for a lot of things...
Replies
7
Views
2,749
I have been developing a program on studio 5000 in function block. I exported the program section from one computer to another. The function block...
Replies
2
Views
2,236
Back
Top Bottom