Industry Online Support
Technical Forum
4/15/2018 9:29 AM | |
Posts: 2 Rating: (0) |
FUNCTION FC 3: BOOL TITLE =Routing Pointers //FC3 can be used to change pointers. AUTHOR : AUT1CS1 FAMILY : INDADDR NAME : ADDRPOINT VERSION : 0.0 VAR_INPUT Bit_Byte : BOOL ; //0: Bit address, 1: byte address Inc_Value : INT ; //Increment (if value neg. => decrement/if value pos. => increment) END_VAR VAR_IN_OUT Pointer : DWORD ; //Pointer to be changed END_VAR VAR_TEMP Inc_Value1 : INT ; //Interim value increment Pointer1 : DWORD ; //Interim value pointer Int_Value : DWORD ; //Auxiliary variable END_VAR BEGIN NETWORK TITLE = //The block intercepts changes that change the area information of //the pointer or that lead to "negative" pointers automatically. SET ; //Set RLO to 1 and R #RET_VAL; //reset overflow L #Pointer; //Supply value to temporary T #Pointer1; //interim value pointer L #Inc_Value; //Supply value of temporary T #Inc_Value1; //interim value increment A #Bit_Byte; //If =1, byte address instruction JC Byte; //Jump to byte address calculation L 7; //If value of increment > 7, L #Inc_Value1; <I ; S #RET_VAL; //then set RET_VAL and JC End; //jump to End L -7; //If value of increment < -7, <I ; S #RET_VAL; //then set RET_VAL and JC End; //jump to End A L 1.3; //If bit 4 of the value = 1 //(Inc_Value negative) why L 1.3 = 1 means negative ? in my idea if L 0.7=1 means negative help me please. thanks morteza salehi Programming with STEP 7 A5E00706944-01 ------------------------------------------------------------------------------------------ AttachmentPages from S7prv54_e full.pdf (73 Downloads) |
Last edited by: Jen_Moderator at: 4/16/2018 9:09:07 AMEdited text for better reading. Last edited by: Jen_Moderator at: 4/16/2018 9:11:12 AMNew subject after splitting |
|
4/19/2018 3:46 PM | |
Posts: 2 Rating: (0) |
thanks |
Follow us on