Ben

Serial Connection - New Protocol

Recommended Posts

Hi, i am trying to read and send some data via a new serial protocol. I have tried using a few samples elsewhere on the forum but i cant seem to prod the device as per the DAQ Factory serial guide.

I have so far got the comms setup and in the monitor i can send and see a TX entry but i don't get a response. Probably because the command i am sending isn't formatted correctly. More info on how it should be formatted is attached.

 

Any help would be appreciated.

extract.pdf

Share this post


Link to post
Share on other sites

The most likely issue is the CRC.  The device is probably rejecting your query because you aren't calculating the CRC correctly.  What script are you using to calculate this?

Share this post


Link to post
Share on other sites

Thanks for the reply. This probably shows my naivety here. I was simply trying to send the example commands from the manual i attached via the monitor windows. Such as..

01 02 01 EA E5 00 01 0F D0 04

But to no avail. Being a complete novice I should probably educate myself in serial protocols, CRC etc.

Share this post


Link to post
Share on other sites

After a bit of research (probably not enough) and some testing of another device that connects to the controller i think that the string below is correct including the CRC.

01 02 01 EA E2 00 23 17 04

I am putting     \x01\x02\x01\xEA\xE2\x00\x23\x17\x04    into the Monitor Output String but i am not seeing a response. Is my string formatted incorrectly?

Share this post


Link to post
Share on other sites

You used the correct format for entering hex values into the monitor, but it may be the wrong packet.  Are you sure the destination ID is 2?  The docs only show me a packet type of EA E5, you have EA E2.

Share this post


Link to post
Share on other sites

Hi, thanks for the reply. I managed to get it working using the string. I think it was a wiring fault. Now time to try parsing. thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now