Hi,
I am looking at reading an ultrasonic sensor value through IO-Link, using a Omron NJ501-1320 PLC connected through EtherCat to a IFM AL1332 master with a Wenglor U1KT001 Ultrasonic sensor.
I have managed to read the 2 outputs of the sensor using this:
Output_1 := TestABit(USINT_TO_BYTE(TxPDO_input_byte_1_6000_02),USINT#0);
Output_2 := TestABit(USINT_TO_BYTE(TxPDO_input_byte_1_6000_02),USINT#1);
But cannot read the ultrasonic sensor distance value, this is what page 2 in the manual says:
Measured Value in 1/10 mm 2…15 14 Bit 300…4500
Octet 1 Subindex 3 (LSB) 2 1 Bit Offset 7 6 5 4 3 2 1 0
I tried a couple of conversions but couldn`t get the distance reading.
Any ideas?
Help appreciated.