Corona Virus Self Isolation Puzzle

L D[AR2P#0.0]

Lifetime Supporting Member
Join Date
Nov 2006
Location
UK
Posts
6,694
For anyone stuck in self isolation, here's a puzzle to keep you occupied.



Attached is a structured text function block that I wrote and used recently (in an S7-1500 plc), the puzzle is to determine what the function block would be used for.....
 
Not familiar with S7 Structured Text. What does the pound sign (#) before the variable names mean? I have never seen this with CoDeSys.
 
Not familiar with S7 Structured Text. What does the pound sign (#) before the variable names mean? I have never seen this with CoDeSys.


It tells that variable is inside of FC / FB block. On this it is located to STAT variables of FB.
Without # it would point outside from FB (like MW20 or DBWxx address directly which could be bad programming on FB if FB is multiused)
 
Is it considered bad practice to write to the outputs* at any point in the FB other than just before a RETURN**?


* Numerator and Denominator, in this case
** whether such RETURN is explicit or implicit
 
No experience with Siemens, nor have the software. I guess I'm stuck with Rockwell puzzles, and that will take a lifetime... Well, except when I'm dead, no more puzzles.
 
Is it considered bad practice to write to the outputs* at any point in the FB other than just before a RETURN**?


* Numerator and Denominator, in this case
** whether such RETURN is explicit or implicit


My answer to your question is no. I prefer to address the outputs at the bottom but I would not consider it bad practice.

But I think you meant addressing the outputs more than once and in this case I would agree.
 

Similar Topics

Here's another puzzle to take your mind off the current situation. Attached is some structured text that flashes the variable 'Flash'. A small...
Replies
2
Views
2,263
No, not literally damage to equipment. lol What kind of impact do you think the virus and panic will cause on manufacturing and Automation...
Replies
11
Views
4,775
Anyone doing out of country trips right now? My company just took a job that will be in Mexico. I'm not exactly thrilled about traveling there...
Replies
38
Views
11,616
It's about: The generation that gave us everything we have: our parents and grandparent. When they are in a retirementhome they stay in...
Replies
1
Views
1,974
I am hopeful that some one may be able to help with this application. I have an automated dial table which uses 2 Corona generators to treat...
Replies
9
Views
3,929
Back
Top Bottom