novice question

briana banks

Member
Join Date
Jul 2005
Posts
242
Hi and Happy new year.

I need to calculate the time in min & sec format from
rate which is in real format.

the rate is quantity/min so i devide the quantity_sp with
the rate.this gives me time in real format.
 
Hi Briana(?),

So the real holds the number of minutes (with a decimal point).

For a Siemens PLC you should:
1. Truncate the real (holds the number of minutes + the number of seconds after the decimal point). This truncated value (32-bit INTEGER) is the number of minutes.

2. Convert this truncated integer value back into real.

3. Subtract the truncated value from the original real value.

4. Multiply the result by 60. This value is the number of seconds (but I would suggest using a RND op).
 

Similar Topics

I'm self taught so far, so hang with me as I try to explain my issue. I've got an archived program file for a PVP6 that I'm opening on FT ME ver...
Replies
13
Views
2,446
Hi All I dont have the sofware, so asking a small question. when installing FT SE Client,on PC, does it require sharing folders with the...
Replies
3
Views
6,220
Hi All register REG of type integer. i wish to know when each bit is "on" (or "off") by comparison of the total value. each bit in the register...
Replies
11
Views
2,584
Hi All RSLogix 5000 How do i caculate duration in one equation. for instance 23:45 (PM) to 2:33 (AM) and 13:45 (AM) to 15:45(AM)? Duration...
Replies
1
Views
2,205
Hi All I have a recipe object in my display . I want to create 2 buttons. one for Save using the RecipeSave command and one for Restore using...
Replies
2
Views
5,092
Back
Top Bottom