You are not logged in.
Hi,
I'm trying to use the Monarco HAT to elongate a signal. I want to detect an optical sensor being "tripped". Once the sensor is tripped, it will release a 24V signal, but often that signal is very short (~30ms). I used the TIMER block in a "delayed off" mode, with pt = 1s. My sensor is going into DI2, and the elongated output is coming out of DO2.
Weirdly, when I probe DO2 with an oscilloscope, the value is 5V until the "u" signal from the sensor is tripped. Then it drops to 0. It seems to be doing exactly the opposite of what I want, which is for the signal to remain at 0V when the sensor has no signal, and go up to a value when it has received a signal.
The TRND block shows the signal as going from 0 to "1" (I'm not sure what the y-axis units are).
Is there something I'm doing wrong?
^(TRND block, for "u1". shows pulses as going from 0 to 1)
Last edited by selam.gano@xyzrobotics.ai (2018-11-20 11:23:30)
Offline
Hi,
sorry to hear you are struggling with the DOs. All your observations are perfectly valid and you did pretty well. Here is the explanation of Monarco HAT digital outputs in detail.
Either change your wiring or use the NOT block between the timer and the output. Note that the latter might not work if 5V is not high enough for the receiving device.
Hope this helps, let me know.
Kind regards,
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline