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

EasyControll - easy822-DC-TCX I/O lesen schreiben

Jordi
2007-01-25
2007-02-05
  • Jordi - 2007-01-25

    Hallo Leute

    hab mal eine Frage zum Lesen/Schreiben einzelner I/O der easy822 mit der easy Control EC4P. (CoDeSys)

    Bis anhin schreibe und lese ich die ich die I/O's so :

    Net_Update(byNetDrvNr:=0, PstruNetMain:=ADR(NET_MAIN));
    NET_MAIN.SND.aToID[2].byQ:=170;
    INPUTS:=NET_MAIN.RCV[2].wI;   
    

    Nun möchte ich die I/O's einzel einlesen (BOOL), wie bei der easy Control.

    geht das? was für eine Addresse muss ich meinen Variablen geben.

    AT %XX0.1:BOOL;???

    Gruss Di

     

    Related

    Talk.ru: 2

  • Jordi - 2007-02-05

    Danke für keine Unterstüzung....

    habs trozdem rausgefunden.....für die dies intressiert.......hier:

    Net_Update(byNetDrvNr:=0, PstruNetMain:=ADR(NET_MAIN)); 
    NET_MAIN.SND.aToID[2].byQ:=170; 
    INPUTS:=NET_MAIN.RCV[2].wI;  
    IF INTPUTS.1=0 THEN                 (*zugriff auf Bits 1*)
      NET_MAIN.SND.aToID[2].byQ.5:=1;   (*Bit 5 setzen*)      
    END_IF
    
     
  • gravieren - 2007-02-05

    Hi

    Danke für die Info.

     

Log in to post a comment.