No Driver Found I2C Device

2017-04-27
2018-04-01
  • raymondclark0 - 2017-04-27

    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?

    Thanks,
    Raymond.

    IMG: codesys.png

    I2C_LSM303.library [301.13 KiB]

    LSM303_Accel.devdesc.xml [2.38 KiB]

     
  • raymondclark0 - 2017-05-03

    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:

    l viewforum.php?f=23 l

    Thanks,
    Raymond.

     
  • fcos - 2018-04-01

    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.

    <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

     

Log in to post a comment.