Industry Online Support
Technical Forum
4/18/2013 7:56 AM | |
Posts: 3609 Rating:
|
Import of a Technical Question of the User Nelly659
|
4/18/2013 5:21 PM | |
Joined: 1/28/2009 Last visit: 6/11/2024 Posts: 6841 Rating:
|
Hello, Try the following codes and update(FC34 from IEC functions): [code]ORGANIZATION_BLOCK "Cycle Execution" TITLE = "Main Program Sweep (Cycle)" VERSION : 0.1 VAR_TEMP OB1_EV_CLASS : BYTE ; //Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1) OB1_SCAN_1 : BYTE ; //1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1) OB1_PRIORITY : BYTE ; //Priority of OB Execution OB1_OB_NUMBR : BYTE ; //1 (Organization block 1, OB1) OB1_RESERVED_1 : BYTE ; //Reserved for system OB1_RESERVED_2 : BYTE ; //Reserved for system OB1_PREV_CYCLE : INT ; //Cycle time of previous OB1 scan (milliseconds) OB1_MIN_CYCLE : INT ; //Minimum cycle time of OB1 (milliseconds) OB1_MAX_CYCLE : INT ; //Maximum cycle time of OB1 (milliseconds) OB1_DATE_TIME : DATE_AND_TIME ; //Date and time OB1 started TEST1 : DATE_AND_TIME ; TEST2 : DATE_AND_TIME ; END_VAR BEGIN NETWORK TITLE = L 5; T LB 23; CALL "SB_DT_DT" ( DT1 := #TEST1, DT2 := #TEST2, RET_VAL := MD 20);[/code]
Best regards Hamid Hosseini |
5/8/2013 10:28 AM | |
Posts: 10 Rating:
|
Hi there, Thank you very much for your response. I try this in my code. Best regards, Nelly |
This contribution was helpful to
1 thankful Users |
Follow us on