Hello,
I'm trying to collect data from a Keller pressure sensor, model 33x, via SDM-SIO1 in RS485 half duplex mode. I've written a CRBasic program using the Serial I/O functions, as described bellow:
'OPEN AND CONFIGURE THE SENSOR PORT
SerialOpen(SerialPort,9600,51,0,200)
'INITIALISE AND RELEASE (FUNCTION F48)
'0xFA 0x30 0x04 0x43 SerialOutBlock(SerialPort,CHR(250)+CHR(48)+CHR(4)+CHR(67),4)
Delay(1,50,mSec)
SerialInBlock(SerialPort,szBuffF48,10)
'Read pressure value
'0xFA 0x49 0x01 0xA1 0xA7
SerialOutBlock(SerialPort,CHR(250)+CHR(73)+CHR(1)+CHR(161)+CHR(167),5)
Delay(1,50,mSec)
SerialInBlock(SerialPort,szBuffF73P,9)
Delay(1,50,mSec)
I've set the SerialOpen() function with a code 51 (Half-Duplex RS485). I'm monitoring the signal flow through a oscilloscope, and the signal's been transmitted but I ain't receiving any answer from the Keller sensor. I've checked the connections as many as possible and it's ok, which means something must be wrong with my script. Could you help me with that?
Regards,
Francisco.
AS a start, try reversing the RS485 connections to the sensor. The nomenclature used varies between manufacturers.
... Also why not use the mod bus protocol that the sensor appears to support? Seems that it might be easier in the long run.
Thanks for the help! It worked in modbus protocol.
Regards,
Francisco.