CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

No Driver Found I2C Device
https://forum.codesys.com/viewtopic.php?f=21&t=7802
Page 1 of 1

Author:  raymondclark0 [ Thu Apr 27, 2017 1:55 pm ]
Post subject:  No Driver Found I2C Device

Hi,

I'm trying to create a library to interface the raspberry pi with the Adafruit LSM303 accelerometer and magnetometer board. I can see the device and read the registers using the i2cget command via SSH, I've tried to follow the instructions to create a new device description and library but when I try to add it to a project it shows the red triangle and says "No Driver Found" in the status tab when going online with the PLC. What driver is this referring to? Is this an error in the device description file?

Attachment:
codesys.png


Thanks,
Raymond.

Author:  raymondclark0 [ Wed May 03, 2017 11:34 am ]
Post subject:  Re: No Driver Found I2C Device

Hi Guys,

Manged to get it to work, not sure what the problem was, I ended up deleted the device description and stating again.

Submitted the working library to here:

viewforum.php?f=23


Thanks,
Raymond.

Author:  fcos [ Sun Apr 01, 2018 5:42 pm ]
Post subject:  Re: No Driver Found I2C Device

Hi,

I had the same problem, I think this is because I commented out the line with the Initialize method call in the devdesc.xml.
Uncommenting the line solved the problem for me. So I think Initialize method call should be present even if your FB that extends Raspberry Pi i2c does not implement it.

Code:
<FBInstance basename="$(DeviceName)" fbname="I2CHAT_DI6acDQ6rly">
   <Initialize methodName="Initialize"/>
   <CyclicCall methodname="AfterReadInputs" task="#buscycletask" whentocall="afterReadInputs"/>
   <CyclicCall methodname="BeforeWriteOutputs" task="#buscycletask" whentocall="beforeWriteOutputs"/>
</FBInstance>


BR
Florin

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/