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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
thks actually a photocell doesn't have any filter..
Standard.TOF
thks a lot, is it available as language programming?
Language programming? I have not heard of this.
I mean ST
Yes, ST has almost all of the things.
The Documentation for this function even has an example written in ST.
https://help.codesys.com/webapp/nZzsIvNv0ruZ1f6MRyM0e-wgLKU%2FTOF;product=standard;version=3.5.15.0
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
yes... I mean our low budget photocells ;-)
Hehehehe
yes... I mean our low budget photocells ;-)