modbus hex

juddge

Lifetime Supporting Member
Join Date
Oct 2021
Location
Penrith NSW
Posts
21
only done small bits with modbus 984

and there is no register from the manufacturer of the equipment

i have to be able to read and write to about 6 locations

the equipment is an electronics ballast for UV lamps

the existing PLC has failed and i need to install a new one

currently the items used are

Power, Voltage, Errors, Lamp KW input, Lamp Power, Run , Run Status

they manufacturer thinks the example in the photo tells me everything , but i just cant seem to figure it out - can anyone who knows hex addressing for modbus please assist ?

infor from manufacturer.png
 
Modbus Register Maps - the armpit of technical documentation

Another example to prove my point.

I don't understand it either. It talks about 'bytes'. Modbus does not naturally send bytes - it sends and receives 16-bit 2-byte registers and strings of individual bits.

I personally love Modbus and use it all the time yet I frequently run into situtations like this where the documentation is unusable.

I wish you well in seeking more information.
 
This is where you go back to the manufacturer, tell them their doc is not helpful, and ask for examples from this page to be read using some 3d party Modbus client like Modscan32.
 
Are you sure this protocol is even Modbus and not a proprietary protocol? I've seen cases where people use the term "Modbus" to mean "communication protocol" because they don't know any better.


Can you share a link to the full documentation from your attached image?
 
From the sounds of it you have not managed to set up communication between the devices at all?

The photo seems to tell you how to control the device using existing communication, but nothing about how to set up the communication in the first place.

Perhaps what you need is detailed elsewhere in the manual.
 
It's Modbus RTU.

See the example on page 27 (attached and condensed in image below).

The new PLC will need to read all eight holding registers, starting at PDU address 0x100 (256 decimal). It may be that the PLC Modbus configuration will refer to that starting address as Modbus Address 257 (e.g. 40257 or 400257).

0x02 Server address (allows multiple servers on the same RS-485 multi-drop circuit)
0x03 Modbus command to Read Multiple Holding Registers.
0x01 0x00 (0x0100, 16-bit unsigned integer, MSB-first) PDU Address of first register
0x00 0x08 (0x0008, 16-bit unsigned integer, MSB-first) number of 16-bit registers to read
0x45 0xc3 (0xc345, 16-bit unsigned integer, LSB-first) CRC

Untitled.png
 
My PLC Wont accept code like that
see photo

will aonly allow 0h type codes


is the plc confusing me or are the hex codes confusing me ?

could someone show me what i should have as the start address ?

example 1.png
 
You need put 100h only there. Read holding registers is same than 0x03 code. number is 1 to 8 depending how many registers you want to read.
 
My PLC Wont accept code like that
see photo

will aonly allow 0h type codes


is the plc confusing me or are the hex codes confusing me ?

could someone show me what i should have as the start address ?
What Lare said (0100h, possibly 0101h but since this is Modbus Hex addressing i.e. PDU addressing, the range is 0h to FFFEh it is almost certainly the former i.e. 0100h).

See here for Modbus RTU configuration on AutomationDirect CLICK PLC.

The 0x prefix convention is an alternative to the h suffix convention: if the PLC uses the h suffix convention then the 0x prefix is neither used nor needed.

Both conventions imply the digits are hexadecimal; I used 0x because that was what I saw in the ELC manual.
 
I agree with the above the holding registers are 0 to .. actual address 4000 to ..
below is a typical request for reading the holding registers (bytes)

01 slave Address
03 Function code (read holding registers)
01 Starting address hi (Hex 100)
00 Starting address lo
00 Quantity of registers hi (only reading 6 registers so hi byte is 0
06 Quantity of register lo
C4 Checksum lo
0B Checksum Hi
All the above are in Hex, it will depend on how your system treats the bytes it has been known that byte reversal is required and in some circumstances there can be a word offset so either 100h or 101h
The manual does not explain it too well but looking at it I certainly agree,
 
just an update for people - so i am going to site today to connect my laptop and use modscan and modsim to test and see what the equipment is doing

ill update later
 

Similar Topics

I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
3
Views
71
Dear All, i am trying to connect Danfoss inverter with s7 200 cpu 226.but microwin shows following error at DATA Ptr.i assigned different VB...
Replies
1
Views
42
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
6
Views
140
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
216
Apologies for not being the best IDEC programmer. I recently was doing some inspections on a site that had 3 FC6A IDEC processors. The issue is...
Replies
0
Views
73
Back
Top Bottom