Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

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.

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

1 Answer 1

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.

share|improve this answer
    
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. –  geek225 Nov 14 '13 at 15:41
    
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. –  darron Nov 14 '13 at 22:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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