Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

indirekte Adressierung

Roger
2006-01-31
2006-02-01
  • Roger - 2006-01-31

    Weiss jemand, wie ich in CoDeSys indirekt adressieren kann?

    Ich meine damit etwas in diesem Sinn:

    x:=5;

    Wert1:=%IB(x);

    Wert2:=%IB(x+1);

    etc.

    Danke im voraus!

    Roger

     
  • Anonymous - 2006-02-01

    Originally created by: joohrte

    Es sollte als Pointer mΓΆglich sein.

    VAR

    pStart_EINGANG : POINTER TO BYTE ;

    pLese_Eingang : POINTER TO BYTE ;

    Wert1 : BYTE ;

    Wert2 : BYTE ;

    END_VAR

    pStart_EINGANG := ADR(%IB0) ;

    pLese_Eingang := pStart_EINGANG ;

    Wert1 := pLese_Eingang^ ;

    pLese_Eingang := pStart_EINGANG + 1;

    Wert2 := pLese_Eingang^ ;

     

Log in to post a comment.