CodeSys Raspberry pi I2C driver not found

jeroenaero
2024-11-07
2024-11-12
<< < 1 2 (Page 2 of 2)
  • andrax

    andrax - 2024-11-09

    I took a look at your project.
    First of all, a Raspbery Pi4 is installed.
    You must use the GPIOs_A_B(GPIOs B+/Pi2).
    The error ULINT can't be set to IDINT.... with your project as well.
    If I change your project to ‘CODESYS_Control_for_Raspberry_Pi_SL’
    the error is gone.

     
  • jeroenaero - 2024-11-09

    We use a Compute module 4 it's 64bit based, so i cannot change it to sl.what are the possibilities to get the i2c working?

     
  • andrax

    andrax - 2024-11-09

    This is the operating system and has nothing to do with the runtime. Unless you use 64bit commands. You can see for yourself that you have errors with 64bit compilers

     
  • andrax

    andrax - 2024-11-09

    Sorry, wrong expression.
    You have a 64bit system, so do I.
    You can also use the 64bit runtime, but most bib and commands are 32bit and are not properly supported.
    I had read somewhere that there are problems with I2C. That's why I recommend switching to PI_SL and using the correct gpio.

     
  • jeroenaero - 2024-11-11

    I succeed to change the device to PI_SL but still the same problem of the I2C device switching between running and not running. the only difference with your project is that yo use I2C_master device version 4.7.0 and i 4.7.13, for GPIO i also use the 4.7.13 version and you the 4.7.0. Can you send me the older version of the Raspberry PI pheripals library, because i cannot choose lower version then 4.7.10 for the GPIO and I2C_master device

     

    Last edit: jeroenaero 2024-11-11
  • jeroenaero - 2024-11-11

    I also installed your codesys version with the codesys for raspberry pi package version 4.7.0. but with no succes, only the TCA multiplexer has a constant green turning circle, the ADS1115 still changing from running to not running.

     
  • andrax

    andrax - 2024-11-11

    Are you using a multiplexer?
    Which one?

     
  • jeroenaero - 2024-11-12

    I don't have a multiplexer so it very weird that it connects with that multiplexer.
    If i do a I2C scan on the PI terminal, i only get the device addresses 0x48 and 0x51. One for the ADC and one for RTC.
    I will try again with your libraries

     
  • jeroenaero - 2024-11-12

    Finnaly i get it working. There was a line in the file that set the ADS1015 chip in /boot/firmware/config.txt which i removed and after that the ADS1115 has a green turning circle and i got values. i created a new component so it fits our ADS1015. see screenshot. It works also with Codesys Control for Raspberry Pi 64 SL after adding the ULINT_TO_UDINT conversion in the library.
    i think the chip was all the time in use by the Raspberry pi itself.

    Thanks for your help!

     
<< < 1 2 (Page 2 of 2)

Log in to post a comment.