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?
I2C_LSM303.library [301.13 KiB]
LSM303_Accel.devdesc.xml [2.38 KiB]
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:
l viewforum.php?f=23 l
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.
<FBInstance basename="$(DeviceName)" fbname="I2CHAT_DI6acDQ6rly">
<CyclicCall methodname="AfterReadInputs" task="#buscycletask" whentocall="afterReadInputs"/>
<CyclicCall methodname="BeforeWriteOutputs" task="#buscycletask" whentocall="beforeWriteOutputs"/>
Log in to post a comment.