05-05-2012 03:22 AM
Hello,
I want to communicate with my energy analyzer using MODBUS RS485. I have JBUS/MODBUS COM module and USB-RS485 converter on it.
Communication FRame is below.
Slave adres : 0x05
Code(Read) : 3
Starting Address : C550
Data : 4 word
My example code is 0503 C950 0001 03BA
But I got this when read data from it.
05-06-2012 11:17 AM
Why don't you try the Modbus library? With just an image, it's impossible to tell whether you are specifying the write characters correctly. Do you have the constant set for hex display?
05-06-2012 01:42 PM
...and if you used the ModBus library the CRC bytes would be in the right order.
05-07-2012 01:38 AM
First I tried to use modbus library examples. I got this error code. Then I tried to use the other functions.
And about the Modbus CRC-16, on this site (http://www.lammertbies.nl/comm/info/crc-calculation.html) I calculated modbus 16 code is "0xDD47" using "0503C6500002".
But when I calculate this code "0503C6500002" on MB CRC-16 I get "
I'm very new on this system, trying to understand. What am I doing wrong?
05-07-2012 02:15 AM
First read this thread
The data you use is changing. Now you use: 0503C6500002 The CRC is: F916
What is 'GI' My hexadecimal goes up to F. Maybe you have another number system ?!?
In the thread above you can also see how to use the loopback command. Use this to figure out if your connection is OK.
How did you connect your RS-485 device. Many errors are made with RS-485 connections.
05-07-2012 02:20 AM - edited 05-07-2012 02:21 AM
Ok I'll read this thread but about CRC-16, before I said, I calculated it in this site (http://www.lammertbies.nl/comm/info/crc-calculation.html) and got this
but you said it is "F916". 😕
I'ım usign JBUS/MODBUS module and for connect to my PC I'm using UBS-RS485 converter.
05-07-2012 05:14 AM
Your connection:
Tell me how you connect your device. Which pin to which pin, do you use terminators, did you connect ground, 2 or 4 wire RS-485
About CRC:
There are many ways to calculate CRC all right for their purpose. I use the NI ModBus lib but mostly I use my own VI to communicate with ModBus devices. So if both CRC methods work fine for ModBus I think than that is the correct way.
Also try the loopback command from that thread.
05-10-2012 03:53 AM
I'm using JBUS/MODBUS module on my IED. and after module I'm using USB/RS485 converter.
05-10-2012 05:23 AM
What is a IED ?
If it is like Wiki says ' improvised explosive device' I am out....
Do you have a manual of your device ?
How did you connect your RS-485 cable ?
05-10-2012 05:30 AM
intellegent electronic device like drives, relays etc..
On JBUS module it has 3 part : A-, B+, GND
And on my USB/RS485 converter its turkish but you could understand that there is nothing different. 3 part A, B, GND
http://www.denizelektronik.com/pdf/dELAb_USB_RS485_CONVERTER.pdf