Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Use of Chanli in custom class

Use of Chanli in custom class 2 weeks 4 days ago #12299

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Thank you received: 2
  • Karma: 0
Hello,

I bounced against a new problem...
I'm using ET200SP's multifieldbus islands (IM155-6MF) through modbus. Unfortunatly the byte order in the words for the IO's is little endian meaning that the 8 IO's are in the highest byte (their manual states otherwise, but their tool and IRL doesn't).
To get not into problems with the Ai's (they are big endian) I don't have the LE option enabled in the slave.
Since I use the FC3 to fetch the data, the first 8 bits have to be read, otherwise proview won't read the last byte(error?), so I first read a chanli and afterwards 8 chandi's (numbered from 8-15). This works perfect...

Getting everything a bit more organised and more intuitive I thought I'd create a custom class for all my IO cards. Here I have the problem that a class of chanli isn't accepted by the classcreator, every other IO class (chandi, chando, Ai, Ao, ...) are working fine, but only the chanli gives the problem (using pwrb:Class-chanli). Chanlo has the same problem.

Is there something I'm not seeing here because I can't see anything special in the flags?
Template with Ai as dummy (set as bit8).

template.jpg
Last Edit: 2 weeks 4 days ago by jds.
The administrator has disabled public write access.

Use of Chanli in custom class 2 weeks 23 hours ago #12301

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3183
  • Thank you received: 504
  • Karma: 133
Hi jds,

I've tested ChanIo and ChanIi and didn't have any problems. Note that it's a uppercase i, not a lower case L in Io an Ii.

Also remember to set the IO and IOCard bits in Flags attribute of the ClassDef object.

/Claes
The administrator has disabled public write access.

Use of Chanli in custom class 2 weeks 19 hours ago #12302

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Thank you received: 2
  • Karma: 0
Hello Claes,

I took notice already about the upper and lower case characters but the value's aren't accepted, all the other are (and working). For now I've took an ChanAi as byte or int 8 (16 with the outputs) and this works as expected. But when I try the ChanLi or Lo the (typeref)value just jumps back to the previous value.

To be complete: I'm using the lastest available proview version V6.1.3-1 on a debian 12 system. I'll see if I can find an older system to check the same thing and maybe have a look at the original wbload file in the source files, maybe I can find something in there.
The administrator has disabled public write access.

Use of Chanli in custom class 2 weeks 19 hours ago #12303

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 123
  • Thank you received: 2
  • Karma: 0
Haha,

again an user error, more one: learn to read ... I've read (always had) an "L" instead of an "I".

Problem solved and to catalog under "trying to run when learning to walk"

thanks!
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 7.297 seconds