We have a problem with CodeSys on a raspbery pi with an ADS1015 analog to I2C module.
It can't find the I2C device on the i2c bus, it says No I2C Driver Found. When we use the RPI terminal we can find the I2C device and read it out. The i2c-1 bus is also accessible from codesys. The device address of the Analog to I2C module is 0x48.
Can someone have a look what the problem is? i submitted the screenshots in the attachments.
i also include the device description and library.
yes i took the library from another forum: https://forge.codesys.com/forge/talk/Runtime/thread/f1400b71b6/, it is made for the ads1115 but the ads1015 is almost the same device with same adresses i only changed the divide value of the analog value, because thats the only difference between the ads1115 and ads1015.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you, i tried your library and device description but i don't get analog values.
Do i something wrong?
i also got an library error at the I2C_BASE functionblock the calcCycleTime gave an variable size error, so i added thet conversion from ULINT_TO_UDINT.
Ok,
this is a test programme with ADS1115.
It is currently configured for the TCA9548 muxboard.
If you want to run the ADS1115 single, then change the settings to the default values:
βIs Multiplex:β False
βStage mux channel numbers:β [0,0,0,0,0,0,0,0,0]
It is also important that the libraries are installed correctly here.
But should be in this project
Okay i will try.
I tried already the different settings.
The CodeSys version i use, is CodeSys 3.5 SP20 Patch 3.
The device which i use is CodeSys Control For Raspberry PI 64 SL version 4.13.0.0.
The wiring should be okay because i'm using the Edatec ED-CM4IND-1432-4C(EU).
Last edit: jeroenaero 2024-11-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Communication with the ADS1115 is actually simple.
1. write config
2. write address pointer
3. read conversation register
The ADS1115 works like a multiplexer.
This means that you do this individually for each channel that you want to read.
e.g:
Channel 1: write config > write address pointer > read conversation register
Channel 2: write config > write address pointer > read conversation register
Channel 3: write config > write address pointer > read conversation register
Channel 4: write config > write address pointer > read conversation register
then you start again from the beginning
You can also omit individual channels or read only one.
It doesn't matter.
I have written the driver so that I can also use it on the TCA9548.
The driver is from Stefan Dreyer.
In your case, the driver works and communication with the ADS1115 is running.
As you can see, the cfgWrong:=FALSE
If you could not write or read data, cfgWrong:=TRUE;
This means that either something is wrong with your ADS1115 or you have connected something incorrectly.
Question: what voltage do you want to measure?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
your driver is not running.
All libraries must be present first!
Then you can try the following.
Delete the ADS1115 and the I2C_maseter from the device tree.
Create everything again.
okay, the weird thing is the driver is only continuous running when i enable debug output.
if debug is not enabled it's continuous switching from running to not running.
i will check again and download the libraries
Which versions of libraries do you use, can you send a screenshot?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll have to have another look at which library you need.
But you can easily find out.
Create a completely empty project and insert the TCA9548.
You don't need the board.
Then look in the library and resolve all conflicts
If you can compile the project without errors, delete the TCA9548 and insert the ADS1115.
The driver should then also run.
Small bonus: with the TCA9548 you can expand your network as you wish and use identical sensors multiple times
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
We have a problem with CodeSys on a raspbery pi with an ADS1015 analog to I2C module.
It can't find the I2C device on the i2c bus, it says No I2C Driver Found. When we use the RPI terminal we can find the I2C device and read it out. The i2c-1 bus is also accessible from codesys. The device address of the Analog to I2C module is 0x48.
Can someone have a look what the problem is? i submitted the screenshots in the attachments.
i also include the device description and library.
I took a look at the xml
Is this even the right driver and where did you get it?
Last edit: andrax 2024-11-07
yes i took the library from another forum: https://forge.codesys.com/forge/talk/Runtime/thread/f1400b71b6/, it is made for the ads1115 but the ads1015 is almost the same device with same adresses i only changed the divide value of the analog value, because thats the only difference between the ads1115 and ads1015.
take a look here.
there is a working driver in the collection
https://forge.codesys.com/forge/talk/Deutsch/thread/87bfe42cbb/?limit=25#514f
thank you, i tried your library and device description but i don't get analog values.
Do i something wrong?
i also got an library error at the I2C_BASE functionblock the calcCycleTime gave an variable size error, so i added thet conversion from ULINT_TO_UDINT.
Ok,
this is a test programme with ADS1115.
It is currently configured for the TCA9548 muxboard.
If you want to run the ADS1115 single, then change the settings to the default values:
βIs Multiplex:β False
βStage mux channel numbers:β [0,0,0,0,0,0,0,0,0]
It is also important that the libraries are installed correctly here.
But should be in this project
Note: if you do not get any values.
Check the correct wiring again.
The board seems to be running and you have no error.
Last edit: andrax 2024-11-07
Okay i will try.
I tried already the different settings.
The CodeSys version i use, is CodeSys 3.5 SP20 Patch 3.
The device which i use is CodeSys Control For Raspberry PI 64 SL version 4.13.0.0.
The wiring should be okay because i'm using the Edatec ED-CM4IND-1432-4C(EU).
Last edit: jeroenaero 2024-11-07
Hi,
Communication with the ADS1115 is actually simple.
1. write config
2. write address pointer
3. read conversation register
The ADS1115 works like a multiplexer.
This means that you do this individually for each channel that you want to read.
e.g:
Channel 1: write config > write address pointer > read conversation register
Channel 2: write config > write address pointer > read conversation register
Channel 3: write config > write address pointer > read conversation register
Channel 4: write config > write address pointer > read conversation register
then you start again from the beginning
You can also omit individual channels or read only one.
It doesn't matter.
I have written the driver so that I can also use it on the TCA9548.
The driver is from Stefan Dreyer.
In your case, the driver works and communication with the ADS1115 is running.
As you can see, the cfgWrong:=FALSE
If you could not write or read data, cfgWrong:=TRUE;
This means that either something is wrong with your ADS1115 or you have connected something incorrectly.
Question: what voltage do you want to measure?
The voltage what i want to measure is 3.286v.
I can check the voltage through terminal, see screenshots.
Last edit: jeroenaero 2024-11-08
I tested your project but with same results
i am still not seeing analog values.
I also included the library list, the mainprogram.
Last edit: jeroenaero 2024-11-08
I also have a screenshot of the library versions under your library
You are also missing the libraries.
No library should be grayed out or highlighted in blue
your driver is not running.
All libraries must be present first!
Then you can try the following.
Delete the ADS1115 and the I2C_maseter from the device tree.
Create everything again.
okay, the weird thing is the driver is only continuous running when i enable debug output.
if debug is not enabled it's continuous switching from running to not running.
i will check again and download the libraries
Which versions of libraries do you use, can you send a screenshot?
Ok, with debug you suppress the errors, but that doesn't help you any further.
You can find information about the missing drivers here
https://forge.codesys.com/forge/talk/Runtime/thread/8981ce928a/
and here
https://github.com/stefandreyer/I2C-Multiplex
I'll have to have another look at which library you need.
But you can easily find out.
Create a completely empty project and insert the TCA9548.
You don't need the board.
Then look in the library and resolve all conflicts
If you can compile the project without errors, delete the TCA9548 and insert the ADS1115.
The driver should then also run.
Small bonus: with the TCA9548 you can expand your network as you wish and use identical sensors multiple times
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
i created a new project and did what you said, but still the same problem unfortunately.
The ADS1115 is constantly changing from running to not running.
Can you please make your project available?
I'll take a look at it.