Help with reading a serial device


andybdjuk

Recommended Posts

Hi, I have a new project to add to my house and can monitor with DaqConnect, I have installed central heating that is controlled Via a RS485 network. I have been told that if I fire 01 0A 81 00 00 00 FF FF 2C 09 I should get some data back, so I put \x01\x0A\x81\x0\x00\x00\xFF\xFF\x2C\x09 into device config monitor but I'm not getting anything back. All the hardware works as it runs under its own program.

Am I missing something simple?

Is there a way daqfactory can monitor what is being tx/rx via a port, what Im thinking is if i could monitor what the control program is sending out?

Thanks

Andy

protocolv3system.pdf

Link to comment
Share on other sites

In the middle you put \x0 not \x00, that may be a problem. Otherwise the problem is likely wiring or comm port settings.

You can have DF monitor a serial port, but only by having it echo between two ports. Its not particularly easy. I believe there are tools available that will do this (and not much else), but I have not used them.

Link to comment
Share on other sites

hi, the xo thing was a typo. I found a com port spy program and the results are

[20/10/2010 19:58:31] - Written data

01 0a 81 00 00 00 ff ff 2c 09

[20/10/2010 19:58:32] - Read data

81 4b 00 01 00 00 00 40 00 00 40 00 13 02 00 01

00 00 00 00 01 00 00 00 14 00 0c 15 1c 01 01 00

00 00 00 00 00 ff ff ff ff 00 be 00 01 03 13 3a

06 08 00 15 09 1e 10 10 1e 16 17 1e 11 09 00 15

16 00 10 18 00 10 18 00 10 7a 4d

Another view showing the read request 01 0a 81 00 00 00 ff ff 2c 09 on the top line

2936 20/10/2010 20:23:56 IRP_MJ_WRITE UP STATUS_SUCCESS 01 0a 81 00 00 00 ff ff 2c 09

2937 20/10/2010 20:23:56 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_WAIT_ON_MASK) UP STATUS_SUCCESS 01 00 00 00

2938 20/10/2010 20:23:57 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_COMMSTATUS) DOWN STATUS_SUCCESS

2939 20/10/2010 20:23:57 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_COMMSTATUS) UP STATUS_SUCCESS 00 00 00 00 00 00 00 00 4b 00 00 00 00 00 00 00 00 00 00 00

2940 20/10/2010 20:23:57 IRP_MJ_READ DOWN STATUS_SUCCESS

2941 20/10/2010 20:23:57 IRP_MJ_READ UP STATUS_SUCCESS 81 4b 00 01 00 00 00 40 00 00 40 00 13 02 00 01 00 00 00 00 01 00 00 00 14 00 0c 15 1c 01 01 00 00 00 00 00 00 ff ff ff ff 00 be 00 01 03 14 17 1e 08 00 15 09 1e 10 10 1e 16 17 1e 11 09 00 15 16 00 10 18 00 10 18 00 10 d0 f1

2942 20/10/2010 20:23:57 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_WAIT_ON_MASK) DOWN STATUS_SUCCESS

2943 20/10/2010 20:23:57 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_WAIT_ON_MASK) UP STATUS_SUCCESS 01 00 00 00

2944 20/10/2010 20:23:57 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_COMMSTATUS) DOWN STATUS_SUCCESS

2945 20/10/2010 20:23:57 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_COMMSTATUS) UP STATUS_SUCCESS 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

2946 20/10/2010 20:23:57 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_WAIT_ON_MASK) DOWN STATUS_SUCCESS

2947 20/10/2010 20:23:58 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_PURGE) DOWN STATUS_SUCCESS 05 00 00 00

2948 20/10/2010 20:23:58 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_PURGE) UP STATUS_SUCCESS

2949 20/10/2010 20:23:58 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_COMMSTATUS) DOWN STATUS_SUCCESS

2950 20/10/2010 20:23:58 IRP_MJ_DEVICE_CONTROL (IOCTL_SERIAL_GET_COMMSTATUS) UP STATUS_SUCCESS 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Alas i still cant get DF to get this data, all the hardware is ok

Is there any more pointers

thanks

Andy

Link to comment
Share on other sites

So they provide a piece of software that run on the same PC as DAQFactory that works? If so, first reboot to make sure that software isn't holding the port open. Then its probably just a port setting, baud, etc. Double check everything. Make sure flow control is off. Watch for alerts.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.