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

GPIO update at startup

o5i
2016-11-16
2016-11-18
  • o5i - 2016-11-16

    First of all, i have a relay Board connected to the gpio pins of the pi. The Relayboars is activelow because of that i have to set the gpio to high at startup. I have done this by negating the variable i use...

    %QX0.5:=NOT OUT_DOSE_1_ON;
    

    But it seems that it doesent work. I have to switch the variable to on and than back to off...
    In the IO config of the GPIO shows me that the output of the pin is high but the input is low.. After switching they are equal state..
    It seems that the IO doesent update whitout interaction...

    IMG: Neue Bitmap (2).jpg

    IMG: Neue Bitmap.jpg

     
  • o5i - 2016-11-18

    Hi, i did some tests whitout results.. If i boot up the pi nothing happens until i start the runtime.. It seems that the default values in the runtime are low... I wanted to change them in the GPIO configuration tab but i cant change them.. Now i dont know how to fix this.. If i put the variable to high the runtime should write them to high at startup but it doesent write the variable... I think its a problem of the runtime...

     
  • o5i - 2016-11-18

    I added a Timer of 5ms, now it seems to work, but its a dirty workaround, i dont want to leave it this way..

     

Log in to post a comment.