snap ethernet-based i/o units protocols and programming guide
snap ethernet-based i/o units protocols and programming guide
snap ethernet-based i/o units protocols and programming guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
CHAPTER 5: ADVANCED MODBUS PROGRAMMING<br />
4. To convert a brain memory map address to a Modbus Unit ID <strong>and</strong> Register Address, type<br />
the last eight digits of the brain’s memory map address in the MemMap Address field.<br />
Make sure there are no spaces in the address (for example, type F0300020).<br />
5. Click the right-arrow button .<br />
The equivalent Modbus address appears. NOTE: The Modbus numbers are decimal.<br />
Example: Reading a Memory Map Address<br />
For example, suppose you want to read the status of Scratch Pad bits. You can determine the<br />
memory map address in one of two ways:<br />
Use the ioManager Inspect window to find the address you want <strong>and</strong> copy it.<br />
Look in Appendix A, find Scratch Pad addresses (page 129), <strong>and</strong> locate the address for the<br />
current state of Scratch Pad bits.<br />
Either way, you determine that the memory map address is F0D80000. Using ioManager, you<br />
convert the MemMap address F0D80000 to a Unit ID of 110 <strong>and</strong> a Register Number of 1.<br />
Example: Writing to a Memory Map Address<br />
As another example, suppose you want to send a powerup clear (PUC) to the brain. This operation<br />
code is in the Status Write area of the brain’s memory map address. To determine the address<br />
<strong>and</strong> the data to write to send a PUC, check the Status Write area in Appendix A (page 107).<br />
From the appendix, you determine that the memory map address for an operation code is<br />
F0380000, <strong>and</strong> the specific data you must write to send a PUC is 0x00000001. Using the Modbus<br />
conversion page, you find that address F0380000 equals a Unit ID of 30 <strong>and</strong> a Register Number<br />
of 1.<br />
SNAP Ethernet-Based I/O Units Protocols <strong>and</strong> Programming Guide 101