Modicon M221 Word %SW50 Seconds

ControlSystems

Lifetime Supporting Member
Join Date
Dec 2020
Location
Presscot AZ
Posts
17
Hey everyone!
I have trouble making sense of the math conversion in this seconds tag of the Modicon M221 Real Time Clock. I thought I understood an integers binary to decimal conversion.... But why during runtime online session is this %SW50 Seconds counter going from 0 to 90 rather than 0 to 60 then resetting itself ??? Can anyone explain :oops: Thank you for reading this post
 
Following on from what the Dr said, the system words for time are in BCD. There's a function to convert BCD to Int.

Add a new Operation block into your ladder logic and use the BTI instruction (BCD to binary) to convert, i.e:

%MW0 := BTI(%SW50)

Will give you seconds in %MW0.
 
Thank you DrBitBoy and Saffa for the posts. You cleared things up for me. I need to dedicate more time to exploring the functions not on the menu tool bar.
 
Yeah, Machine Expert doesn't make it easy with needing to use the "Operate" blocks. Not like the good ol days of RSLogix 500 where you had a nice palette of all the instructions to hover over for a hint, and then context sensitive help after you placed an instruction
 

Similar Topics

Hey Programmers, Heres todays puzzle I was trying to solve... I have a Modbus TCP network with two Modicon M221 controllers live on my work bench...
Replies
0
Views
467
Hi all, i am trying to scale a 0 - 1000 analogue input to a -10000 to 10000 output with 0-500 been -10000 to 0 and 501-1000 to 0-1000 is there...
Replies
7
Views
2,893
Hi All, I'm looking for some insight into what the SHORT instruction does. The help file wasn't very useful, as I found the explanation to be...
Replies
4
Views
1,495
Hi all. I’m currently trying to combine 3 memory words in to a single display on a weintek hmi as I want to display running time. I have the...
Replies
4
Views
1,827
Hello Everyone, Is there a procedure in the Schneider EcoStructure Machne Basic program to save the controllers runtime memory word data (ie...
Replies
4
Views
2,360
Back
Top Bottom