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.

New Here? Please read this important info!!!


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

Reply
 
Thread Tools Display Modes
Old September 1st, 2023, 12:09 PM   #1
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
Siemens S7/TIA v18: Is there a "first scan" in TIA portal?...

Hi, I want to initialise some tags on first scan only. As they are related to wall-clock time, I want to do the initialisation when the PLC first goes into RUN mode, rather than give the tag a 'start up' value in the datablock.

Is there a built-in tag that I can use for this?

I *think* it might be %M0.0 but I'm not sure.

Thanks
  Reply With Quote
Old September 1st, 2023, 12:20 PM   #2
MarkNightingale
Lifetime Supporting Member + Moderator
United Kingdom

MarkNightingale is offline
 
Join Date: Sep 2010
Location: In The VAT Shed
Posts: 723
Go to properties of the CPU.

Go to System and Clock memory

Here you can enable System Memory bits. And then it is possible to select a MB.

Then you have a bit for First scan.
  Reply With Quote
Old September 1st, 2023, 12:22 PM   #3
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts: 16,132
For S7-1200/1500 you can activate the system bits. I think you can find them in the CPU properties under "system/clock bytes" or something to that effect. It is described in the dialog what are the merker addresses and their function.
In S7-300/400 you have to use OB100, OB101 and/or OB102.
__________________
Jesper
NOTICE:
JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm !
Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ
  Reply With Quote
Old September 1st, 2023, 12:28 PM   #4
mk42
Lifetime Supporting Member
United States

mk42 is offline
 
Join Date: Jun 2013
Location: MI
Posts: 3,151
Quote:
Originally Posted by Mas01 View Post
Hi, I want to initialise some tags on first scan only. As they are related to wall-clock time, I want to do the initialisation when the PLC first goes into RUN mode, rather than give the tag a 'start up' value in the datablock.

Is there a built-in tag that I can use for this?

I *think* it might be %M0.0 but I'm not sure.

Thanks

Couple options, in theory:
  • OB1 has an "Initial Call" bit, which the help says is true after startup, or after the OB has been redownloaded.
  • You can activate the system byte, which includes the First Scan bit you mentioned.
  • You can create a startup OB (OB100 by default) which is called as the PLC starts up, before the first call of OB1.
  Reply With Quote
Old September 1st, 2023, 12:29 PM   #5
Mas01
Member
United Kingdom

Mas01 is offline
 
Join Date: Oct 2020
Location: Leicester, England
Posts: 1,044
Ah, cheers, all.
Sorted...
Attached Images
File Type: png system and clock memory.png (57.3 KB, 30 views)
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


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
TIA Portal v18: WinCC: NEXT button valid only when user logs in... Mas01 LIVE PLC Questions And Answers 7 August 16th, 2023 04:46 AM
TIA Portal v18: Does TIA Portal support "regular expressions"? Mas01 LIVE PLC Questions And Answers 8 August 9th, 2023 11:20 AM
run Step 7 without TIA Portal dmned64 LIVE PLC Questions And Answers 4 June 7th, 2017 07:39 AM
Siemens TIA Portal V13 Help Nan LIVE PLC Questions And Answers 7 May 18th, 2017 02:40 PM
Siemens TIA Portal Step 7 V13 lefeverj LIVE PLC Questions And Answers 0 April 17th, 2016 03:47 PM


All times are GMT -4. The time now is 08:38 AM.


.