Calculate a timer with speed value S7 STL

OK, go with your orginal coding and set the speed to 30m/min and see what happens when you use /D to calculate 20/30
You don't need to worry about this sort of thing when using floating point.
 
Hey

Thanks
now I understand why they must be as large as possible.

I wrote it like this and the program is running in the machine now:

L 2.000000e+001
L "speed_machine"
/R
L 6.000000e+004
*R
RND
T "B_S_MEM".Triggertime
 

Similar Topics

Hi all, I've tried to calculate a Preset Timer Value for a CPU318-2 using this code; TIME1 till 5 are local integers TIME6 was S5TIME //...
Replies
5
Views
3,292
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
1,061
Good morning, I have a question. I don't know much about ST yet I would like to calculate the average number of products per hour. how do I do...
Replies
22
Views
2,981
Can someone help me with this? I'm no good at SCL - virtually everything I've done so far has been ladder logic. The return value from the...
Replies
13
Views
1,117
I want to calculate the energy consumed from instantaneous power. Can this be done using the TOT block with timebase set to Hour?
Replies
2
Views
700
Back
Top Bottom