Digital input filtering

poseidon
2020-07-02
2020-07-02
  • poseidon - 2020-07-02

    Hi, I am very new in codesys and I am trying to develop a new project. One of the 1st task I have to solve is to manage a photosensor which gives a digital signal (24V) . I manage it through modbus.
    Now the point is that the signal can go up and down many times due to misreadings. I would like to get the first up front. use it to command other operations, and do not consider other downs-ups for a variabale (settable) time interval.
    I Looked around but I didn't find anything.
    Is there somebody that can help me? I use language programming mode
    thks

     
  • aliazzz

    aliazzz - 2020-07-02

    Hi,

    A good practice is always try to resolve such 'contact' problems in the input-electronics and not in code. Search if you hardware has an RC input filter, usually per settable per IO input channel (almost every modern industrial Digital IO card has such RC filter settings).
    So please check your hardware specs.

    I Hope this helps you further

     
    • poseidon - 2020-07-02

      thks actually a photocell doesn't have any filter..

       
  • i-campbell

    i-campbell - 2020-07-02

    Standard.TOF

     
    • poseidon - 2020-07-02

      thks a lot, is it available as language programming?

       
  • aliazzz

    aliazzz - 2020-07-02

    You mean: the photocell hardware we are using doesn't have that feature.
    Mostly the more deluxe photocells carry such features onboard like: on-delay, off-delay oneshot, adjustable Response time etc. This adjustable response time is what you need.

    Otherwise you can solve it with a capacitor (RC) or in software with @i-campbell's Standard.TOF solution.

     

    Last edit: aliazzz 2020-07-02
    • poseidon - 2020-07-02

      yes... I mean our low budget photocells ;-)

       
      πŸ‘
      2
      • aliazzz

        aliazzz - 2020-07-02

        Hehehehe

         
        πŸ‘
        1
    • poseidon - 2020-07-02

      yes... I mean our low budget photocells ;-)

       

Log in to post a comment.