Jump to content

Recommended Posts

Posted (edited)
I'm not familar with Siemens but the below works for AB stuff: Step 1 (1.5-.5)=1 ( result placed in an integer register, Hour component) Step 2 (1.5-1)=.5 ( subtract the above hour component from orginal number) Step 3 (.5*60)= 30 minutes ( Multiply results of step 2 by 60 this is your min. component, put result in an integer register) Only problem with this is that in step three the results could be rounded to 60 min., you might have to write logic to account for this. ( if above 59 then move 59 to min. else move min. to min.) Note when moving a floating point numbers to an integer rounding must take place. This works for AB PLC's. Not sure about Siemens. Edited by Mickey

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...