ML1400 RTC to String

Freak

Member
Join Date
Oct 2006
Location
Barossa Valley
Posts
195
Hi - I am using a ML1400 to do some real time based control. Given that the RTC can deviate over time I have added to a PV+ tch screen the ability to edit the time. I am doing this by converting RTC:0.Hr and RTC:0.Min to an integer to both display and then writing to the RTC to change the time.
I have also built a string to display the day hour an minute neatly in one tag, this is the only bit I am unhappy with as the minute is displayed minus the leading zero, it doesn't affect the operation it just looks untidy.
Any ideas on how to add the leading zero? I note that it isn't there in the RTC:0.Min tag.
I guess I could write to the touch screen system time and display that as I think that does have the leading zero but is that the best option?
Cheers
Peter
 
Usually I make a screen to input clock changes. These are stored in plc in temp ints. I place a button on screen to execute changes by a bit, which in plc moves the values to rtc when the bit is triggered.
 
Hi Robo77 - the functionality of my code works fine, I have done it in a similar manner to you, I would like to display the leading zero in minutes rather than have it missing. So currently it displays 11:1 instead of 11:01 for example.

Cheers
 
Solved

Had another look and the solution I have gone with is to use a compare and have added the 0 to the string as needed. Not the neatest code in the PLC but the screen looks neat :)

Not sure if there is a better solution but this works for now.
 

Similar Topics

Hello, I am new here and have been working with PLCs for a few years now. I have been tasked with setting up a Micrologix 1400….. to a Cmore 10...
Replies
10
Views
551
Hi, We may of finally received out first v21 ML1400. IP address set, proceed to download standard file for our machines & at about the 80% mark...
Replies
10
Views
1,468
I have a Allen Bradely 1500 that has a cracked board. It still works but needs replaced (battery is no longer connected). To make migration easier...
Replies
10
Views
3,262
Hi, I've got a new project for a vacuum conveying system. We require to add another HMI to the existing system which will then feed 2 separate...
Replies
6
Views
1,855
Hi All I have connected a Keyence SR1000 to a Compact Logix PLC and am triggering the scanner and reading barcodes over Ethernet/IP, no issues...
Replies
2
Views
861
Back
Top Bottom