Port of FreeModbus to LPC11xx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Port of FreeModbus to LPC11xx

1,431件の閲覧回数
wiktor_sleziak
Contributor I

Hello,

I am working on a temperature measurring device. Currently, I must do a communication with PC. UART is working great, I can send and receive any strings. Main goal is use a Modbus RTU protocole and I got stuck with this.

I am using a LPC241x demonstration project from freemodbus-v1.5.0 to convert for my program. I changed all VIC interrupts function to NVIC in portserial.c, porttimer.c and portevent.c. Also I modfied port.c and I used portmacro.h. After compilation i get no errors, but when  I start Modbuss Poll,  finally I am getting a nothing.

I have hope that someone help with this subject.

/* ----------------------- Start implementation -----------------------------*/
int
main( void )
{
   eMBErrorCode eStatus;

   eStatus = eMBInit( MB_RTU, 0x0A, 0, 38400, MB_PAR_EVEN );

   /* Enable the Modbus Protocol Stack. */
   eStatus = eMBEnable( );

   for( ;; )
   {
      ( void )eMBPoll( );

      /* Here we simply count the number of poll cycles. */
      usRegInputBuf[0]++;
   }
}

0 件の賞賛
返信
2 返答(返信)

1,035件の閲覧回数
vicentegomez
NXP TechSupport
NXP TechSupport

Hi

can you please confirm the part number that you are using?

Regards

Vicente

0 件の賞賛
返信

751件の閲覧回数
xueyuquan
Contributor I

I am working on a temperature measurring device. Currently, I must do a communication with PC. UART is working great, I can send and receive any strings. Main goal is use a Modbus RTU protocole and I got stuck with this.

I am using a LPC1111 demonstration project from freemodbus-v1.6 to convert for my program. I changed all VIC interrupts function to NVIC in portserial.c, porttimer.c and portevent.c. Also I modfied port.c and I used portmacro.h. After compilation i get no errors, but when  I start Modbus Poll,  finally I am getting a nothing.

I have hope that someone help with this subject.

0 件の賞賛
返信