-1
\$\begingroup\$

I'm developing a slave modbus TCP/IP application on the PIC32 platform. Do you have any idea about the the role of the eMyRegInputCB (UBYTE *pubRegBuffer, USHORT usAddress, USHORT usNRegs) function or the eMyRegHoldingCB (UBYTE *pubRegBuffer, USHORT usAddress, USHORT usNRegs, eMBSRegisterMode eRegMode) function?

I don't know how to call these functions in my program.

\$\endgroup\$
  • \$\begingroup\$ Have you tried by help of compiler? \$\endgroup\$ – Roh Nov 14 '13 at 12:33
  • \$\begingroup\$ Perhaps this may help?: MODBUS Slave Documentation (I found it with Google) \$\endgroup\$ – Tut Nov 14 '13 at 12:57
  • \$\begingroup\$ Look specifically at the examples in the link I provided. \$\endgroup\$ – Tut Nov 14 '13 at 13:04
2
\$\begingroup\$

Those functions are not called by you... they're provided by you.

You implement those functions in your application to handle a MODBUS master's request for data from your slave. Look at examples provided online (search for those function names... what Tut provided)

You'll need to call the MODBUS library's port setup functions and periodic polling functions to allow the framework to operate. That should also be in the examples.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your response Darron, but I don't find any example in the net explaining the slave modbus TCP/IP for the PIC. Any advice, or idea please. \$\endgroup\$ – geek225 Nov 14 '13 at 15:41
  • \$\begingroup\$ I don't use PICs much at all... you'll need to get the TCP/IP stack working then get the MODBUS library hooked into it. I'm not sure what stack that would be, so I can't help much there. \$\endgroup\$ – darron Nov 14 '13 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.