Not applicable
Jan 09, 2015
05:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 09, 2015
05:08 AM
I want to try to use the Xmc4500 Automatioin Kit as a Modbus Master.
After implementing the Modbuss001.. App and Generating the Code, i search in the code Timeout's of Request and Response Frames... perhabs i overlook ?? in which generated file are the timouts ?
Best Thanks 🙂
After implementing the Modbuss001.. App and Generating the Code, i search in the code Timeout's of Request and Response Frames... perhabs i overlook ?? in which generated file are the timouts ?
Best Thanks 🙂
10 Replies
Jan 11, 2015
06:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 11, 2015
06:27 PM
kestudent wrote:
I want to try to use the Xmc4500 Automatioin Kit as a Modbus Master.
After implementing the Modbuss001.. App and Generating the Code, i search in the code Timeout's of Request and Response Frames... perhabs i overlook ?? in which generated file are the timouts ?
Best Thanks 🙂
So sorry as I don't get your questions.
Not applicable
Jan 12, 2015
01:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 12, 2015
01:01 AM
pleace forgett the first Question :)) i have found the answer...
But i have an another Question ?
After using and generating MODBUS001.. app:
Dave generates a mbport.h file, in this file its exist a vMBPortTimersDelay() function... Where is this function implemented ?
I hope you understand my question 🙂
But i have an another Question ?
After using and generating MODBUS001.. app:
Dave generates a mbport.h file, in this file its exist a vMBPortTimersDelay() function... Where is this function implemented ?
I hope you understand my question 🙂
Jan 12, 2015
10:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 12, 2015
10:02 PM
Yeah.. I understand your question as I cannot find the function too.:(
Jan 12, 2015
10:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 12, 2015
10:29 PM
The below code will not be compiled by the compiler since the function is not available. And I think the reason that this function is empty is because it is to allow user to create it's own timer for time out purposes.
if( ( eMBCurrentMode == MB_ASCII ) && MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS )
{
vMBPortTimersDelay( MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS );
}
Jan 12, 2015
10:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 12, 2015
10:34 PM
The timeout wait is also disabled. And the reason for the timeout is described by the comments below.
/*! \brief Timeout to wait in ASCII prior to enabling transmitter.
*
* If defined the function calls vMBPortSerialDelay with the argument
* MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS to allow for a delay before
* the serial transmitter is enabled. This is required because some
* targets are so fast that there is no time between receiving and
* transmitting the frame. If the master is to slow with enabling its
* receiver then he will not receive the response correctly.
*/
#ifndef MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
#define MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS ( 0 )
#endif
Not applicable
Jan 16, 2015
01:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 16, 2015
01:22 AM
Thanks for the Answers...
Now Modbus Master is ready ... But when i implement the GUI in combination with modbus, the gui dont function ... Could be the reason is in SPI - Master Appi ?
Thanks...
Now Modbus Master is ready ... But when i implement the GUI in combination with modbus, the gui dont function ... Could be the reason is in SPI - Master Appi ?
Thanks...
Not applicable
Jan 19, 2015
01:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 19, 2015
01:09 AM
//main.c
eMBErrorCode eStatus;
DAVE_Init();
/* Initialize GUI Library */
GUI_Init();
/* Set background colour */
GUI_SetBkColor(GUI_BLUE);
/* Clear screen */
GUI_Clear();
/* Initialization of MODBUS in RTU mode if require ASCII then pass MB_ASCII in eMBInit*/
eStatus = eMBInit( MB_RTU, 0x01, 0x02, 38400, MB_PAR_NONE);
/*Enable the Modbus Protocol Stack.*/
eStatus = eMBEnable( );
/* Modbus polling loop waiting for an Event*/
while(1)
{
....
}
//portserial.c
BOOL
xMBPortSerialPutByte( CHAR ucByte )
{
UART001_WriteData(MODBUS001_UART_HANDLE,ucByte);
GUI_DispHex(ucByte,8);
GUI_DispNextLine();
return TRUE;
}
Pin Assignment
UART Transmitt P1.5 (Half Duplex)
SPI MRST 2.5 MTSR 3.13 CLK P3.0 ChipSelect P3.1
IO4 P5.11
When the Modbus Master sends a Request Frame, compiler jumps to xMBSerialGetByte and write Data to the UART look above, i get the frame on the GUI but when I measure the RS485(TX-/TX+) interface using an oscilloscope I get nothing.
I hope somebody can help me...
eMBErrorCode eStatus;
DAVE_Init();
/* Initialize GUI Library */
GUI_Init();
/* Set background colour */
GUI_SetBkColor(GUI_BLUE);
/* Clear screen */
GUI_Clear();
/* Initialization of MODBUS in RTU mode if require ASCII then pass MB_ASCII in eMBInit*/
eStatus = eMBInit( MB_RTU, 0x01, 0x02, 38400, MB_PAR_NONE);
/*Enable the Modbus Protocol Stack.*/
eStatus = eMBEnable( );
/* Modbus polling loop waiting for an Event*/
while(1)
{
....
}
//portserial.c
BOOL
xMBPortSerialPutByte( CHAR ucByte )
{
UART001_WriteData(MODBUS001_UART_HANDLE,ucByte);
GUI_DispHex(ucByte,8);
GUI_DispNextLine();
return TRUE;
}
Pin Assignment
UART Transmitt P1.5 (Half Duplex)
SPI MRST 2.5 MTSR 3.13 CLK P3.0 ChipSelect P3.1
IO4 P5.11
When the Modbus Master sends a Request Frame, compiler jumps to xMBSerialGetByte and write Data to the UART look above, i get the frame on the GUI but when I measure the RS485(TX-/TX+) interface using an oscilloscope I get nothing.
I hope somebody can help me...
Not applicable
Jan 20, 2015
01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 20, 2015
01:52 AM
in the last sentence i mean xMBPortSerialPutByte not xMBSerialGetByte sryy
Jan 29, 2015
07:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 29, 2015
07:16 PM
Hi kestudent,
Maybe you can try the example or training independently to ensure that your GUI is working good first.
http://www.infineonforums.com/threads/1967-XMC_HOT-XMC4500-How-to-do-a-basic-GUI-display
http://www.infineonforums.com/threads/2386-XMC4500-GUI-Example-Ping-Pong-Game
Maybe you can try the example or training independently to ensure that your GUI is working good first.
http://www.infineonforums.com/threads/1967-XMC_HOT-XMC4500-How-to-do-a-basic-GUI-display
http://www.infineonforums.com/threads/2386-XMC4500-GUI-Example-Ping-Pong-Game
Not applicable
Feb 05, 2015
04:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 05, 2015
04:25 AM
okey i will try thank you