Studio 5K Function Block Totalizer

toddp65

Member
Join Date
Aug 2014
Location
Florence, Ky
Posts
282
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 subroutine in the main program routine.
I have the code written and executing but I don't seem to be getting the output totalization value.
I've attached a word file with my FB and configuration.
The input shows my totalization but I have no out.
Studio 5K version 33.14

Thoughts and TIA
 
Your block is in Operator Mode.
Your logic is giving it a Program Totalising Start command.

Either change the mode to Program, or place the command in the Operator totalizing start.
 
I'll check this.
How do you determine it's in operator mode and how did it get there?

From what I see the operator request variable/parameter is is 0 or false. Am I missing something?
 
Last edited:
ProgOper output is set to 1. That tells you which state it's in. The Description on the variables will tell you what it is.

You then have a set of commands to be done by the program or operator. It defaults to a state which I'd imagine is how it got this way.
 
The variable is 1 now, which is true, thus setting it to program mode which is what I want.
But even if it's supposed to be 0, it still doesn't funcion that way. Confusing.
 
I looked at one I have running at the minute and sure enough I have a silly number as the target. Maybe that's the trick? Still strange as you'd want to know how far you went past the target, but this is Rockwell.

Can you try it out?
 
Here's my latest numbers and config attached. It displays my TOT is running and should be counting but nothing on the totalization amount output.
I even entered a hard coded number in the parameters for total request but to no avail.
 
Ah. the latest attachment, cmb_2.docx, started at TargetDev2, and did not show the first several items in TOT_01. However, the earlier attachment, fb.docx, showed the earlier items.

1) It might be more useful to post PDFs, not .docx; not everyone has MSWord.

2) It might be more useful to print the project from Studio5k as a PDF, so everything can be seen.

3) TOT_01.Gain is 0.0 in the earlier attachment. Perhaps it should be 1.0?

Cf. this link, and below.
Untitled.png
 
Thanks, Dirtiboy.

My gain is currently 1.0.
Just don't usually create PDF's.
I'll look into the Rockwell document and see about posting project.
This is very confusing because by rights it shold be working because the parameters are True that should be and it says its running.
 
This is very confusing because by rights it should be working because the parameters are True that should be and it says its running.


Never forget this axiom of programming: the PLC cares not a whit what we want it to do, but it will mercilessly and inexorably do exactly what we tell it to do, according to its programming.

This TOT instruction has a lot of parameters, but you have probably looked at each one several times.

  • The gain definitely was 0.0 in the earlier attachment, but you fixed that.
  • The example in the manual (cf. this link) pipes a 1 into the ProgProgReq instruction input. Since you already have that as a 1 in TOT_01, I don't think that is it, but it might be worth trying.

Is this TOT instruction in a routine or program that is actually being executed? If you add a pair of FB ADD instructions, on before and one after this instruction, to increment a REAL or LREAL by 1.0 each time this routine is called, do you see those reals incrementing (use a real to avoid overflow).
 

Similar Topics

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!
Replies
8
Views
297
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
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