11-20-2024 04:27 AM
Hi everyone,
I try for the first time to communicate with a Joy-It DPS 5005 power supply with Modbus RTU.
But somehow I am missing something and fail. Therefore I would like to ask for your help.
The device requires the address code (1 byte), the function code (1 byte), the register starting address (2 bytes), the number of registers to read (2 bytes) and the CRC checksum (2 bytes)
The device address is 10. I want to read a holding register. So the function code should be 3. The register starting address is 0 and I want to read 2 bytes.
The CRC checksum of 0A 03 00 00 00 02 is C5 70.
My first trial was simply using Visa write and send the string 0A0300000002C570 followed by Visa Read. But I always got timeouts and no answer.
Then I thought of using the Modbus API library, created a Modbus instance as new serial slave and then used the Read Holding Registers VI. This didn't work, either. Is it because of the CRC checksum? I don't know how to send it
I would appreciate every help.
11-20-2024 04:58 AM
Why are you using the slave API? Usually the device being communicated is the slave and you use a Master to communicate with it.
11-21-2024 04:12 AM
Have you in any way confirmed that the hardware is connected correctly?
Modbus connectors come in all sorts and sizes, and there's not really a standard wiring.
Some devices use Sub9 connectors, and Rx\Tx on 2\3, some use 5\8... You really have to read the manuals of both ends of the connection...
And I do agree that you should make a master, the device is a slave (answering to commands).