Not applicable
Feb 01, 2016
08:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2016
08:42 AM
Hi everybody,
I'm a beginner with Infineon microcontrollers and Modbus. I'm trying to acquire data from a XMC 4500 with serial Modbus protocol (9600 8 N 1); I also use a USB-RS232 converter and a Modbus Master program.
I know that read only variables are stored in registers 0x100 to 0x1FF and read/write variables from 0x200 to 0x2FF. When I try to read them with specific functions I can't see anything except of zeros, while registers should contain a certain value. But in registers from 0 to 9 I read random values.
Am I doing something wrong? Does anybody ever dealt with this problem and knows how to manage it?
Apologize me if the question may sound stupid, but I can't get through it.
Thanks in advance for any advice.
Andrea.
I'm a beginner with Infineon microcontrollers and Modbus. I'm trying to acquire data from a XMC 4500 with serial Modbus protocol (9600 8 N 1); I also use a USB-RS232 converter and a Modbus Master program.
I know that read only variables are stored in registers 0x100 to 0x1FF and read/write variables from 0x200 to 0x2FF. When I try to read them with specific functions I can't see anything except of zeros, while registers should contain a certain value. But in registers from 0 to 9 I read random values.
Am I doing something wrong? Does anybody ever dealt with this problem and knows how to manage it?
Apologize me if the question may sound stupid, but I can't get through it.
Thanks in advance for any advice.
Andrea.
3 Replies
Feb 01, 2016
06:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2016
06:06 PM
So sorry that I have not really tried ModBus protocol. Can you check if you can receive data from the UART (RS232)?
Not applicable
Feb 01, 2016
11:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2016
11:49 PM
Thank you Travis for your reply.
I tried with an oscilloscope to test pins 1.4 and 1.5 to see if by sending a packet to Rx pin I could receive a back packet answer over Tx pin.
I can see a reply from the micro only when I establish a connection with the board on which it is assembled. While when I send a command in order to read registers I can't get any reply.
How can I test the UART? I'm using Dave 3.1.
I tried with an oscilloscope to test pins 1.4 and 1.5 to see if by sending a packet to Rx pin I could receive a back packet answer over Tx pin.
I can see a reply from the micro only when I establish a connection with the board on which it is assembled. While when I send a command in order to read registers I can't get any reply.
How can I test the UART? I'm using Dave 3.1.
Feb 02, 2016
06:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 02, 2016
06:01 PM
AndreaB93 wrote:
Thank you Travis for your reply.
I tried with an oscilloscope to test pins 1.4 and 1.5 to see if by sending a packet to Rx pin I could receive a back packet answer over Tx pin.
I can see a reply from the micro only when I establish a connection with the board on which it is assembled. While when I send a command in order to read registers I can't get any reply.
How can I test the UART? I'm using Dave 3.1.
Seems like you can see both transmit and receive on the scope. You can check the UART receive buffer to see if you had received the correct data. If the microcontroller is able to do both transmit and receive, then the problem might be on the MOD bus software stack.