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 October 2nd, 2022, 05:38 PM   #1
Lukasz_Poland
Member
Poland

Lukasz_Poland is offline
 
Join Date: Aug 2019
Location: Poland
Posts: 23
Positive edge in SCL all byte

Hello


I have got a problem with positive edge from "system clock memory byte" in Tia Portal. I would like to change byte"system clock memory" to another byte but it should be "positive edge byte"
I saw that function with XOW and AW but it was in STL language and I dont know how to write it in SCL.



Sorry for my poor English.
  Reply With Quote
Old October 2nd, 2022, 06:06 PM   #2
Rob...
Lifetime Supporting Member
United Kingdom

Rob... is offline
 
Join Date: Jul 2016
Location: Manchester
Posts: 409
Could you post the STL version, I can convert to SCL for you.

I think I understand what you need, but an example would clarify it.
__________________
  Reply With Quote
Old October 2nd, 2022, 06:21 PM   #3
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,435
Probably this:
Attached Images
File Type: jpg xow.jpg (186.6 KB, 129 views)
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old October 2nd, 2022, 06:52 PM   #4
Rob...
Lifetime Supporting Member
United Kingdom

Rob... is offline
 
Join Date: Jul 2016
Location: Manchester
Posts: 409
"mw102" := "ew0" and not "mw100";
"mw100" := "ew0";
__________________
  Reply With Quote
Old October 2nd, 2022, 11:01 PM   #5
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 5,859
Quote:
Originally Posted by l d[ar2,p#0.0] View Post
probably this:

+1
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
  Reply With Quote
Old October 2nd, 2022, 11:02 PM   #6
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 5,859
Quote:
Originally Posted by rob... View Post
"mw102" := "ew0" and not "mw100";
"mw100" := "ew0";
+1
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
  Reply With Quote
Old October 3rd, 2022, 02:38 AM   #7
Lukasz_Poland
Member
Poland

Lukasz_Poland is offline
 
Join Date: Aug 2019
Location: Poland
Posts: 23
Thank you very much all for the quick reply. I will check it today at work and send previous program on STL.
  Reply With Quote
Old October 3rd, 2022, 08:50 AM   #8
Lukasz_Poland
Member
Poland

Lukasz_Poland is offline
 
Join Date: Aug 2019
Location: Poland
Posts: 23
Code in STL:
L MB 0
L MB 100
XOW
AW
T MB 1
L MB 0
T MB 100
In MB 100 I have all positive edges from system clock.
That code I was trying convert to SCL.
  Reply With Quote
Old October 3rd, 2022, 11:51 AM   #9
Rob...
Lifetime Supporting Member
United Kingdom

Rob... is offline
 
Join Date: Jul 2016
Location: Manchester
Posts: 409
When talking about the system clock bits, do you mean this:
Attached Images
File Type: png image_2022-10-03_105053747.png (30.5 KB, 88 views)
__________________
  Reply With Quote
Old October 3rd, 2022, 01:16 PM   #10
Lukasz_Poland
Member
Poland

Lukasz_Poland is offline
 
Join Date: Aug 2019
Location: Poland
Posts: 23
Yes, exactly.
I want achieve positive edges in byte MB100. I dont know how convert my attached STL code to SCL. I tried bud it didnt work.
  Reply With Quote
Old October 3rd, 2022, 02:36 PM   #11
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 5,859
Quote:
Originally Posted by Lukasz_Poland View Post
Yes, exactly.
I want achieve positive edges in byte MB100. I dont know how convert my attached STL code to SCL. I tried bud it didnt work.

Show your code (screen shot via [Prnt/Sys Req], past into [Paint], save as PNG, attach via button in [Go Advanced] posting tool in this thread; also show your [System Clock and Memory] window that @Rob... mentioned.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
  Reply With Quote
Old October 3rd, 2022, 03:15 PM   #12
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 5,859
@Rob...'s code works:
smaller.png
Attached Files
File Type: zip fullsize.zip (180.9 KB, 10 views)
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
  Reply With Quote
Old October 3rd, 2022, 03:37 PM   #13
Lukasz_Poland
Member
Poland

Lukasz_Poland is offline
 
Join Date: Aug 2019
Location: Poland
Posts: 23
Dear Colleagues


Everything works fine.Sorry for the confusion and thank you again for your quick reply and written code.I have a lot of work and study ahead of me.


Thank you again.
  Reply With Quote
Old October 4th, 2022, 03:57 PM   #14
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 5,859
Actually, that code does not work: see the red-circles in the image below.

That said, it is close to working and the fix is trivial.
Untitled.png
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
  Reply With Quote
Old October 4th, 2022, 05:00 PM   #15
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,435
Quote:
Originally Posted by Lukasz_Poland View Post
Dear Colleagues


Everything works fine.Sorry for the confusion and thank you again for your quick reply and written code.I have a lot of work and study ahead of me.


Thank you again.

What is your target CPU?
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  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
ET200S - ignore loss of IM-151 cjd1965 LIVE PLC Questions And Answers 10 May 29th, 2013 12:27 AM
Help with S7 Any Pointer's STL??? LIVE PLC Questions And Answers 13 February 15th, 2013 11:39 AM
Siemens S7 SCL OB86 timestamp question bert_iv LIVE PLC Questions And Answers 4 August 3rd, 2011 12:42 PM
Step7 Detecting Positive Edge In SCL mosama LIVE PLC Questions And Answers 8 May 11th, 2011 05:25 AM
Positive edge detection in SCL (S7) Lesa LIVE PLC Questions And Answers 17 October 5th, 2006 09:22 PM


All times are GMT -4. The time now is 08:53 PM.


.