Welcome, Guest
Username: Password: Remember me

TOPIC: Runtime

Re:Runtime 15 years 10 months ago #220

  • Valdemar
  • Valdemar's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 28
  • Karma: 0
Hi Robert,

Thanks for your previuos message.

The data in the PLC that I am going to communicate with Proview is not in a contiguous register numbers. Some data is located at 600H, 900H, 1200H, etc.
It can either be used FC03 or FC04. i tried to configure two Modbus module with different starting register numbers, but it did not work.
When I tried to combine FC03 and FC04, the query for FC04 was not correct. It requested from slave 4 regs. instead of 2 regs.

Is it possible to fetch the data located in a non-contiguous register mapping in PLC?.

Val
The administrator has disabled public write access.

Re:Runtime 15 years 10 months ago #222

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi Val,

It should be no problem reading from several different addresses. Each request you configure with one module (specifying the function code, address). The number of registers that will be reuested depends on how you specify the cannels below each module (depending on how many channels and what type of representation you choose).

All requests are sent at the same time so if the Modbus slave cannot handle several requests at the same time there will be a problem.

On each module you can check the status for errors.

Could you please specify a liitle bit more detailed how you configured this and what you expect it to represent. ?

/Robert
The administrator has disabled public write access.

Re:Runtime 15 years 10 months ago #224

  • Valdemar
  • Valdemar's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 28
  • Karma: 0
Hi Robert,

Yes, there are two modbus modules defined as follows:

IN1 - Modbus module
FC - ReadHoldingReg
Address - 0
Status - OK
Process 1
TreadObject Noder-pcdesktop-Plc -100ms

Two channels
Ain1 - ChanAi
Ain2 - ChanAi

Modbus module IN2 is similar except from:

Address - 1664
Ain3 - ChanAi
Ain4 - ChanAi

All inputs are Int16, range 0-65536 and -32767/32768.

Q : 00 04 00 00 00 02
R : 00 04 04 00 D9 00 D3
Q . 00 04 06 80 00 04 (It should request two regs)
R : 00 08 00 CF 00 CA 00 00 00 00

If only one modue is connected then it works fine.

Val
The administrator has disabled public write access.

Re:Runtime 15 years 10 months ago #225

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi Val,

Im terribly sorry to give you the message that this is a bug. It's a very small fix but I don't have time to fix it in the nearest days. I will put out a new package next week, or I'll try to mail you a new library (libpwrrt). Which distro do you use ?

/Robert
The administrator has disabled public write access.

Re:Runtime 15 years 10 months ago #230

  • Valdemar
  • Valdemar's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 28
  • Karma: 0
Hi Robert,

The distro is Ubuntu 7.04.
Don't worry if you don't have time to fix it soon.

Val
The administrator has disabled public write access.

Re:Runtime 15 years 9 months ago #251

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi Val,

The problem with fetching data from several different starting addresses is now fixed (required that the slave can handle multiple requests at the same time, i.e. large enough buffer).

Also the handling of reconnection is changed. It will now try to reconnect forever. The meaning of ReconnectLimit has changed. Default reconnect timeout-time is 200 ms. If this is not enough setting ReconnectLimit to a value greater than this will be used as the timeout-time.

Robert
The administrator has disabled public write access.
Time to create page: 8.263 seconds