I have a digital sensor that I want to read out on my Controllino.
Here is the manual:
I know the sensor is able to use IO-Link but I don't want to do that, I want to read it just through the digital pins of my Controllino. For some reason I can't get it to work and receive only the value 0 with the following code:
#include <Controllino.h>
void setup() {
pinMode(CONTROLLINO_A5, INPUT);
Serial.begin(19200);
}
void loop() {
float sensorValue = digitalRead(CONTROLLINO_A5);
Serial.print("Sensor value: ");
Serial.println(sensorValue);
delay(2000); // Optional delay to slow down the loop
}
I have the sensor and controllino powered by 12V and the U- from the sensor and the Controllino's GND is connected to GND of the power source.
I connected the switching output 1 (SP1) of the sensor to the A5 input of my Controllino.
Does someone have an idea? Is the wiring correctly done?
There is the possibility to turn off IO Link and the vendor also told me that the IO Link is not necessary for the usage of the sensor, so it should work without it.
Reading for yourself makes you smarter.
I do not know your system requirements.
Perhaps first measure the electrical properties of the sensor signal with a DMM.
I have read that there are also pressure switchers that also measure, and for me it is not clear from the datasheet whether the measured value can be extracted from the switchers or not.
Could you expand on the DMM measurements? What am I looking there for?
How can you measure the pressure using a digital sensor ? The best that you could do is to know whether the pressure was above or below a certain value. Is that good enough ?