lamboom Posted February 20, 2017 Report Posted February 20, 2017 I would like to use the actual Cycle Time (in seconds) of the NJ101 CPU in a Structured Text math equation. You might also call it the Task Period... However it's called, It needs to be the amount of time that has elapsed from the last calculation of the ST math equation. It must be a variable that also satisfies this looping equation: Time:= Time +cycle time .. so that the master equation, which is calculating position information, based on TIME .. is up to date with each calculation in the loop. How do I insert that cycle-time, which might not be identical for each loop, (or, is it) ? Thanks, Regards, Michael
Crossbow Posted February 20, 2017 Report Posted February 20, 2017 NJ uses a fixed cycle time, you set it in task settings, and it never changes. No need to see it in calculation. The cycle time is fixed, but the actual process time for each cycle can be seen in a system variable.
lamboom Posted February 20, 2017 Author Report Posted February 20, 2017 (edited) Hi Crossbow... Thanks... Actually, I think I do need to see it... or at least a cycle count that increases with each count by 1*CycleTime... Time is an element in the equation. Without time, the Frequency or Period of a sine wave could not be constructed. Time must be in the calculation. Is it perhaps just a system global variable? Easily, called, normalized to zero, and modified by each "cycle time"? Perhaps I won't care about the "Process Time"... because it must fit inside of the cycle time... If the cycle time is 1ms, Time would start at zero with the first cycle, and increase by 1ms for each additional cycle.. until the sequence is stopped.? OK .. I get it. The cycle time is fixed. (1ms, 2,ms or 4ms) but, Omron doesn't count the cycles, I'll have to. Thanks again. Edited February 21, 2017 by lamboom
Crossbow Posted February 22, 2017 Report Posted February 22, 2017 There's a function called Get***Cnt which is free running counters, incrementing once per time frame, and there are several time frames that you can select from. 1
lamboom Posted February 22, 2017 Author Report Posted February 22, 2017 Thanks... You're a wonderful person... don't ever change....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now