DIO module with PNP sensor not giving data
Posted: 26 Apr 2022, 15:24
Hello,
We have a RevPi Connect with a DIO module (version 1.4) and a PNP sensor connected to the DIO. We have configured the DIO, all green lights and piTest -d says the module is present. See DIO.png
We have tested connecting Output 2 to Input 2, this works and the values match when you do piTest -w O_2,1 and then piTest -r I_2.
The PNP sensor gives 24 volts or 0 volts as a signal. The 24V and 0V of the sensor is connected to the same power supply as the DIO (PWR and X2). The sensor signal is connected to I_1 (brown cable in DIO.png, black cable in Wiring.png)
The first configuration that we tried in Pictory was all the input modes set to Direct. I have then tried to connect the sensor to the first three inputs and all of them (I_1, I_2, I_3) always gave 0, even when the sensor gives 24V.
The second configuration that we tried was the first 2 input modes set to Encoder and the third input mode set to Direct. I have then tried to connect the sensor to the first three inputs and read the Counter_0 and Counter_1 values as well.
Every one of them gave 0, the counters as well. Expect for one input, the I_1 which is now stuck on the value 1 after applying the second configuration. Again, no matter what the sensor does.
We are a bit lost now on why the DIO input value is not changing. It is a simple circuit and we know that the sensor works by using a multimeter. Any ideas are welcome. Thanks in advance!
Best regards,
Gun
We have a RevPi Connect with a DIO module (version 1.4) and a PNP sensor connected to the DIO. We have configured the DIO, all green lights and piTest -d says the module is present. See DIO.png
We have tested connecting Output 2 to Input 2, this works and the values match when you do piTest -w O_2,1 and then piTest -r I_2.
The PNP sensor gives 24 volts or 0 volts as a signal. The 24V and 0V of the sensor is connected to the same power supply as the DIO (PWR and X2). The sensor signal is connected to I_1 (brown cable in DIO.png, black cable in Wiring.png)
The first configuration that we tried in Pictory was all the input modes set to Direct. I have then tried to connect the sensor to the first three inputs and all of them (I_1, I_2, I_3) always gave 0, even when the sensor gives 24V.
The second configuration that we tried was the first 2 input modes set to Encoder and the third input mode set to Direct. I have then tried to connect the sensor to the first three inputs and read the Counter_0 and Counter_1 values as well.
Every one of them gave 0, the counters as well. Expect for one input, the I_1 which is now stuck on the value 1 after applying the second configuration. Again, no matter what the sensor does.
We are a bit lost now on why the DIO input value is not changing. It is a simple circuit and we know that the sensor works by using a multimeter. Any ideas are welcome. Thanks in advance!
Best regards,
Gun