Combining two words into one word...

randy741985

Member
Join Date
Oct 2006
Location
US
Posts
154
I have a IDEC Micro Smart PLC, I need to take day date Integer and Combine it with the hour integer Example if the day date integer read 00012 and hour read 00022 I would like to combine the two and make read 12022 which would 12 day 22 hour. Is there a cool way of doing this.
 
No idea of the functionality of the IDEC, but if you can do basic math in it....

Multiply the day times 1000 (00012 x 1000 = 12000)

Then add the day integer to the hour integer. (12000 + 00022 = 12022)

Although once you go past day 99, your five digit (12022) will become six digits (100022).
 
Last edited:

Similar Topics

1. Is there a way to send %MD from Twido to Vijeo Citect 7.20? For example in Twido %MD100 reads %MW100 and %MW101 combined. 2. If there is no...
Replies
3
Views
5,247
Hi, I have a functions which extends codes generation for RFID tags. Basically it takes a char and splits it's hex value over 2 chars. I cannot...
Replies
24
Views
9,530
I'm onsite right now and I'm trying to decide how to proceed. I need to make some major edits to the Micrologix 1400 file, but the guy with the...
Replies
9
Views
1,172
Hello, I am trying to write a logic to control a pump. I have my logic as attached. Is there a way to do Auto and Manual control without having...
Replies
12
Views
2,743
Hi there, Quick Question. I have 2 PLCs and 2 solenoids. I would like to wire these up so that If either one turns on, it will turn on both...
Replies
17
Views
11,478
Back
Top Bottom