ModBus RTU mit XMega

  • 1
  • 2
  • Page 1 of 2
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

ModBus RTU mit XMega

 · 
Posted: 31.05.2012 - 00:19  ·  #1
Hallo,

sagt mal hat Jemand von euch schon mal das DemoProgramm "AVR ModBusRTU" versucht auf einen XMEGA zu portieren?

Code

Import SysTick, SerPortC0, SerPortE1, ModBus XMegaSupport, I2Cport;

From System Import Processes, LongWord, LongInt;

Define
      OSCtype = extClock =1843435,
                     PLLmul=17,
                     prescA=1,
                     prescB=1,
                     prescC=1;
                     
  SysTick        = 10;             {msec}
  StackSize      = $0512, iData;
  FrameSize      = $0512, iData;
//Serports
  SerPortC0      = 19200, parNone;              // Monitor
  RxBufferC0     = 255, iData;
// I2C Ports
  I2Cport        = PortC;
  I2Cdat         = 0;
  I2Cclk         = 1;

//Modbus
// only new MEGAs with USART support this default modbus ascii comm. settings (MEGA32 does, MEGA163 does not)
  SerPortE1    = 19200, Databit8, parEven, Stop1;   // do not change baudrate at runtime
  RxBufferE1    = 10, iData;
// Choose port and pin for RS485 line driver
   SerCtrlE1    = PortF, 0, Positive;
// port used, capacity in words, memory area, Framesize (must not exceed 240 bytes)
   ModBus      = SerPortE1, 37, iData, 240; // hier erhalte ich beim übersetzen immer einen Fehler!!
   ModBusMode  = RTU {ASCII}, Timer3;
 


Der Compilerfehler lautet: "ERROR: Define Modbus = Serport, capacity; [10..120] expected"
wo habe ich hier gerade den Denkfehler?

Gruss
Thorsten
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: ModBus RTU mit XMega

 · 
Posted: 31.05.2012 - 14:23  ·  #2
Hallo Thorsten,

die zwei ModBus Treiber sind noch nicht für XMegas portiert, sorry!
Ich habe User Avra kontaktiert der hauptsächlich diesen Treiber geschrieben hat.

rolf
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: ModBus RTU mit XMega

 · 
Posted: 31.05.2012 - 17:11  ·  #3
Quote by rh

Hallo Thorsten,

die zwei ModBus Treiber sind noch nicht für XMegas portiert, sorry!
Ich habe User Avra kontaktiert der hauptsächlich diesen Treiber geschrieben hat.

rolf


Ups, so ein Mist :(

Jetzt habe ich das eine Projekt doch auf XMEGA gemacht und habe darauf nicht geachtet. MIST

Was meinste denn, wie lange eine Portierung dauert?

gruss
Thorsten
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: ModBus RTU mit XMega

 · 
Posted: 31.05.2012 - 17:20  ·  #4
Hallo Thorsten,

das kommt auf den Avra drauf an. Insgesamt müsste das in ein paar Tagen erledigt sein.

rolf
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: ModBus RTU mit XMega

 · 
Posted: 03.06.2012 - 21:35  ·  #5
I will take a look and see what needs to be done.
pvs-deck
PowerUser
Avatar
Gender:
Age: 53
Homepage: pvs-deck.de
Posts: 1340
Registered: 02 / 2009
Subject:

Re: ModBus RTU mit XMega

 · 
Posted: 12.06.2012 - 20:22  ·  #6
Hello Avra.
Quote by Avra

I will take a look and see what needs to be done.


You had can a look and what did you mean, how long could take an adjustment for XMega?

bye
Thorsten
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: ModBus RTU mit XMega

 · 
Posted: 14.06.2012 - 15:16  ·  #7
You did not see it but I had many mails with Rolf and we are working on it. I have made changes on my side for MODBUS ASCII but compiler also needs to be changed and I am waiting for this change. Once it is done, we will do the same for MODBUS RTU and after testing XMEGA MODBUS driver will be published.
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: ModBus RTU mit XMega

 · 
Posted: 28.06.2012 - 09:56  ·  #8
XMEGA MODBUS ASCII driver is working. Moving to XMEGA MODBUS RTU driver.
  • 1
  • 2
  • Page 1 of 2
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   129   143 · Page-Gen-Time: 0.030904s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI