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

Wago 750-842 - I/O problem

andreapier
2020-02-25
2020-02-29
  • andreapier - 2020-02-25

    Originally created by: andreapier

    Hi everyone, I need your help to solve a "strange" problem I am facing.
    My wago 750-842 does not write digital outputs and does not read digital inputs.
    Below you can find my very simple program, along with the harware configuration.
    To summarize, I have a 8 channel DO module, a 8 channel DI module and a 2 channel AI module.
    I correctly receive the 2 AI, but my DI in the program are always false, regardless of the real DI state.
    DO are also always false, even if I activate the output from program.
    I feel like I am missing some very easy configuration step or something like that.
    I also wanto to point out that:
    hardware is working correctly as all I/O respond to modbus request as expectedprogram is correct as everything works as expected in simulation modeCan you please give me suggestion on how to properly read inputs and write outputs so that hardware behaves like it is expected?

    K-BUS
    |____ 750-530 (channels from AT %QX0.0 to %QX0.7)
    |____ 750-430 (channels from AT %IX2.0 to %IX2.7)
    |____ 750-461 (channels from AT %IW0 to %IW1)
    Program (ST):
    VAR
    Β  Β i_ch_1 AT %IX0.0 : BOOL;
    Β  Β i_pt100_1 AT %IW0 : INT;
    Β  Β o_ch_1 AT %QX0.0 : BOOL;
    Β  Β o_ch_2 AT %QX0.1 : BOOL;
    END_VAR
    o_ch_1 := i_ch_1; (*DO 1 on if DI 1 on, off otherwise*)
    o_ch_2 := i_pt100_1 > 100; (*DO 2 on if temperature > 20Β°, off otherwise*)
    
     
  • andreapier - 2020-02-26

    Originally created by: andreapier

    Is there anyone with a suggestion or an idea of something to try?

     
  • i-campbell

    i-campbell - 2020-02-27

    It looks like your i_ch_1 is pointing at bit 0 of your ANALOG input module.
    i_ch_1 AT %IX0.0 : BOOL;

    Should it be changed to %IX2.0?

    By default, I/O doesn't update the addresses unless used in your code somewhere, which may be confusing if you look at the IO mapping online for your digital input module.

     
  • andreapier - 2020-02-28

    Hi, i-campbell, thanks for taking the time to answer.

    You are right, but unfortunately that was just a copy-paste error.
    Mapping in the program is already correct.

    You can find the full program attached, can you please have a look?
    Again, thanks.

     
  • andreapier - 2020-02-29

    Hi, any idea?

     

Log in to post a comment.