You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old February 17th, 2017, 12:37 PM   #1
FernandoJose
Member
Brazil

FernandoJose is offline
 
Join Date: Feb 2017
Location: Brazil
Posts: 5
Issue in STL (Siemens S7 300)

I'm not used to program in STL and I have some issues in set (S) and reset (R) instructions in the following commands:

====================
Network 48
A(
O "DB_010TT1".SOLVE.ALLOW_TABLE_1_TO_LOAD
O "DB_010TT1".SOLVE.ALLOW_TABLE_2_TO_LOAD
)
A(
L "DB_010R01".AUX.CODE_PRG_ARM2
L 0
<>I
)
S "DB_010R01".SOLVE.AUX_START_PROG_ARM2
A "DB_010R01".INPUT.ARM_2.PROGRAM_ACTIVE
AN "DB_010R01".SOLVE.NO_PRG_RUN_ARM_2
R "DB_010R01".SOLVE.AUX_START_PROG_ARM2
NOP 0
====================

As a begginer in STL, I did not understand if the RLO bit is set in each line and applied to the next line.

My issues in this program are:

1.If the first two AND instructions are true, "DB_010R01" is set to 1?
2.If one of the first two AND instructions are false, "DB_010R01" is set to 0?
3.If "DB_010R01" is 0, the following AND and AND(negated) are executed?
4.Afther the AND and AND(negated) execution, "DB_010R01" can be reseted to 0 according to the logic result?
  Reply With Quote
Old February 21st, 2017, 03:53 PM   #2
RVaughan
Member
United States

RVaughan is offline
 
Join Date: Mar 2012
Location: Michigan
Posts: 22
If the first two ANDs are true, "DB_010R01".SOLVE.AUX_START_PROG_ARM2 is set to one. Note the string in quotes is the DB symbolic name, while the actual bit is .SOLVE.AUX_START_PROG_ARM2.

The AND and AND NOT after the SET instruction are evaluated separately from the SET, regardless of the state of "DB_010R01".SOLVE.AUX_START_PROG_ARM2
Now I need to double-check the Hans Berger book to explain why...
  Reply With Quote
Old February 21st, 2017, 04:17 PM   #3
nehpets
Member
Wales

nehpets is offline
 
nehpets's Avatar
 
Join Date: Mar 2009
Location: Wales
Posts: 317
My take on it as ladder

Steve

read L as set and U as reset
Attached Images
File Type: jpg stl.jpg (17.9 KB, 41 views)
__________________
Why do programmers get confused between Halloween and Christmas - OCT31 = DEC25
  Reply With Quote
Old February 22nd, 2017, 05:58 AM   #4
FernandoJose
Member
Brazil

FernandoJose is offline
 
Join Date: Feb 2017
Location: Brazil
Posts: 5
Thanks for the quick answer!
  Reply With Quote
Old February 22nd, 2017, 02:26 PM   #5
wimpiesplc
Member
Netherlands

wimpiesplc is offline
 
Join Date: Feb 2012
Location: Netherlands
Posts: 295
Did you try to switch your view to LAD ? the NOP 0 gets me thinking this was not human-made STL.

nehpets: your second rung show an OR, I think it should be an AND
  Reply With Quote
Old February 22nd, 2017, 03:16 PM   #6
nehpets
Member
Wales

nehpets is offline
 
nehpets's Avatar
 
Join Date: Mar 2009
Location: Wales
Posts: 317
wimpiesplc,

You are right, I stand corrected the two instructions in the second rung should be in series not parallel.

Regards
Steve
__________________
Why do programmers get confused between Halloween and Christmas - OCT31 = DEC25
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Timer inside FB Siemens S7 300 irfan7523 LIVE PLC Questions And Answers 8 July 2nd, 2015 12:59 PM
Siemens S7 300 PLC with profibus arocon LIVE PLC Questions And Answers 4 February 17th, 2013 04:13 PM
Communication Siemens S7 300 X Hitech HMI KendiSaito LIVE PLC Questions And Answers 0 April 25th, 2012 02:43 PM
Siemens or Omron? Gromit LIVE PLC Questions And Answers 30 September 13th, 2008 11:22 AM
siemens s7 300 npn input modules tny LIVE PLC Questions And Answers 2 June 12th, 2006 05:45 PM


All times are GMT -5. The time now is 11:42 PM.


.