![]() Pin TMR_EN connect to the condition you wish to measure time for.ģc. Place FC80 where you need it in the code.ģb. Inside OB1: MOVE #OB1_PREV_CYCLE into "CYCLE"Ģ. Declare a global DINT variable, for example MD80 - "CYCLE" - DINT.ġb. i mean the confusion is in PV value how i will adjust it at 25 sec as its in the form of Long?ġa. This is the block output indicating if ET >= PV.Īctually i want to run this timer with my desired time suppose lets say 25 seconds then what to do you can quote same example for that. This IN_OUT parameter tracks the time counting and is also the memory. ![]() This number is added to the elapsed time when TMR_EN is true. If you call the code block every cycle then this number should be accurate. In OB1 there is a "TEMP" variable called OB1_PREV_CYCLE that gives the cycle duration in msec. We are able to read the scan cycle time of the PLC. This is the duration of time that has gone by since the code block was called (master enable) last. In the case of the example the L#1000 represents 1000 msec. ![]() It is a double integer (DINT), for that reason the "L#" before the number. This is the preset value or target value. The time counter will be reset to 0 if this pin becomes true. The time counting will count time as long as this pin is true. When the code block is enabled, the function of the pin can be used.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |