Hello everyone, I am new to the community and looking to integrate a Zebra FX9600 RFID reader with a Red Lion G10 using Modbus protocol. The Zebra Modbus documentation indicates that the register should be 40100, which I believe translates to 400100 on the Red Lion device. The "Start Inventory" command is a byte type located at offset 0. Since the Red Lion only supports word-size blocks, I created a data block starting at 400100 with a length of 4 words. My question is whether the start inventory command (either 1 or 2) should be placed in the 0th bit of register 400100 and the Handshake value in bit 8 of the same register. Alternatively, should the entire 400100 register (16 bits, 1 word, 2 bytes) hold the Inventory command and the Handshake be located in register 400101? I have tried various combinations, even setting the start register to 400099 and 400101, as it seems the Red Lion shifts registers by 1 due to zero-based indexing. Any insights, suggestions, or corrections on my understanding of Modbus would be appreciated. Thank you, Bret.
To enhance your understanding of Modbus, I recommend exploring the Modbus technical documentation accessible on modbus.org. While Modbus is straightforward and clearly defined on the protocol side, there are various interpretations regarding its implementation, particularly in relation to memory models. One key area of ambiguity revolves around the memory models, including the 0-based "on-the-wire" and the 1- or 0-based interfaces. This may be a familiar concept to you. It is worth noting that the leading "4" in the address 40100 may not necessarily be part of the formal address but rather a redundant reference to the Holding registers. These registers are typically accessed through function codes 03 for reading and 16 for writing, among others. Essentially, when working with the memory starting at Holding Register "address" 100, it could be either a 0-based offset or a 1-based ordinal index. In the realm of Modbus, values are transmitted as 16-bit (2-byte) words. According to the Modbus protocol specification on modbus.org, the byte order within words is typically MSB-first on the wire (with minimal exceptions). This means that each Modbus driver must consider the CPU architecture of the device to ensure proper communication. While the Zebra document may not explicitly mention the byte order within words on the device, certain parameter sets describe 2-byte millisecond fields that appear to follow the MSB-first byte order convention. It is important to acknowledge that some Modbus drivers may reverse the byte order, although this practice is limited to situations where the drivers communicate exclusively with each other or with a configurable driver that can accommodate byte order reversal on the wire.
When using function code 3 to read holding registers, some clients automatically add a 4 to the value. If not, simply input "40100" as the register address.
When setting up my data block, I began at address 400100 with a length of 4 words. This raises the question of whether the start inventory command (either 1 or 2) should be located in the 0th bit of register 400100, while the Handshake value should be at bit 8 of the same register. Alternatively, is the entire 400100 register (16 bits, 1 word, 2 bytes) dedicated solely to the Inventory command, with Handshake stored in register 400101? The Modbus parameter description for Holding register 100 (40100) indicates 4 bytes and a single 4-byte DINT, totaling 8 bytes or 64 bits, noted as 4 words. Assuming a word is 16 bits, the four words indeed add up to 64 bits. This aligns with the definition of a Modbus "word," which brings a dual response - yes and no - to the initial query, and a negative response to the latter. Consequently, the Command and Handshake bytes are consolidated into the first Modbus word, while EnablePreFilter and EnablePostFilter bytes occupy the second word. The AntennaMask's four bytes (32-bit DINT) span across the third and fourth words. However, the exact allocation within the word for Command and Handshake bytes remains uncertain, indicating the need to experiment with various combinations. A suggested approach involves using 1 for both Command and Handshake when Command is Start (2), and employing 2 for both when Command is Stop (2). This method ensures compatibility and minimizes potential discrepancies.
Thank you for your responses, everyone! Brian, your explanation has clarified my main concern - the 2-byte word is utilized for both storing 8 bits of the Inventory command and 8 bits of the Handshake. Despite switching their positions, placing the Inventory command at the 0th bit and the Handshake at the 8th bit, I did not observe any changes. Unfortunately, I did not receive the Inventory Response at 400200. However, the answer to my initial question regarding the usage of words in different contexts may influence the specific registers and bytes I should monitor for the response. The protocol may seem straightforward, but differences in how each vendor implements it can lead to various uncertainties. I will continue experimenting. Thank you, Bret.
bschuhma expressed gratitude for the responses received and noted Brian's explanation regarding the utilization of the 2-byte word for both Inventory command and Handshake in a Modbus operation. Despite switching the positions of the Inventory command and Handshake within the word, no significant impact was observed. The lack of response from the Inventory Response at address 400200 suggests that reevaluating the usage of words in different ways may influence the selection of registers and bytes to monitor for a response. It is evident that while the protocol is straightforward, each vendor's implementation introduces complexities. Furthermore, referencing the Zebra RFID - Modbus TCP manual revealed that the FX9600 Reader follows a Big-Endian Data format, meaning the high byte (bits [15:8]) will be the first of the two consecutive characters (bytes) in a word. Additionally, it is assumed that the Modbus Software (Server?) has been installed on the RFID device. Noteworthy is the difference in address conventions between the Zebra manual and the Red Lion interface, where the former uses a 0-based holding register address with a prepended 4, while the latter uses a 1-based holding register address with a prepended 4. For interfacing with Red Lion, inputting a 1-based ordinal address of 101 (or potentially 100) in the Elementtext box is recommended.
Hi Bret, welcome to the community! You're right in your approach, the Zebra FX9600 reader does communicate with Modbus protocol, and it seems like you've done a good job setting things up so far. To answer your question, the "Start Inventory" command should indeed be placed in the 0th bit of register 400100, and the Handshake value should go in the 8th bit of the same register. This is because Modbus adopts a big-endian word order for transmission, which means that the important values should go at the lower addresses, or in this case, lower bits. Hope this clears things up, if you have any other questions feel free to ask!
Hi Bret, welcome to the community! Modbus is fun once you get the hang of it. From my understanding of your situation, you should really consider placing your "start inventory" command (either 1 or 2) in the first (0th) word of the data block, that is 400100 register. The Modbus on the Red Lion should handle word-to-byte conversions internally since a word is essentially two bytes. Regarding the Handshake, it should ideally sit in the next register, 400101, to prevent any overlap or confusion. This way, each command has its own distinct space. Finally, about your Red Lion shifting registers by 1 due to zero-based indexing, this is a common confusion. Because Modbus typically uses one-based addressing, you might need to subtract 1 from your addresses when programming your Red Lion. Hence, try using 400099 instead of 400100. I hope this helps! Modbus can be quite inscrutable at times, but don't get discouraged. It becomes clearer with practice and experience. Good luck!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: - The recommended register configuration for this integration involves placing the start inventory command and Handshake value in specific registers. It can be either in the 0th bit of register 400100 and bit 8 for Handshake, or the entire 400100 register for Inventory command and Handshake in register 400101.
Answer: - Since the Red Lion G10 supports word-size blocks, it is advisable to create a data block starting at 400100 with a length of 4 words for smooth communication with the Zebra FX9600 RFID reader.
Answer: - Some common pitfalls include incorrect register configuration due to zero-based indexing, misunderstanding of where specific commands should be placed within registers, and overlooking the word-size block limitations of certain devices like the Red Lion G10. It's essential to have a clear understanding of Modbus protocol specifications to avoid such issues.
Answer: - To ensure proper communication and data exchange, it is crucial to follow the recommended register configuration guidelines, address
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.