Codesys V3.5 SP16P4 In the main task the variable tags update when the app runs however other tasks the tags show only ??? even though the tasks are running. In the PLC settings I have tried all the 'Always update variables' settings however still nothing. Any ideas please?
After a lot of frustration the key to us getting this working well was to practice with I2Ctools until we knew exactly what we were doing. We then took several weeks to develop a rubust FB that could be controlled through a OOP method interface for 8 or 16 bits and a few other features. In our FB we added small/big endian support with Pragma IF statements by simply switching the datatostore[1] and datatostore[2] around. As I2C to Azure is the crux of our application it was the best thing we did to...
I asked about the slave device as some need a 8 bit and others 16 bit data word. I posted below all nicely formatted however the server rejected it so it's slightly less now formatted below. I managed to get the new win10 desktop power apps also using the I2C tools cmds and it works well i2cset -y 0 0x68 0x0D 0x0 w (reg 13d,15) i2cset -y 0 0x68 0x14 0x0 w (reg 20d,4) Bear in mind the following: We are interacting with a device with 16 bit data words so adjust accordingly for 8 bit data words In our...
Which I2C part? Get Outlook for Androidhttps://aka.ms/AAb9ysg From: talk@forge.forge.codesys.com talk@forge.forge.codesys.com on behalf of krishemanth forge@codesys.com Sent: Tuesday, March 23, 2021 5:29:24 PM To: [forge:talk] Runtime@talk.forge.forge.codesys.com Subject: [forge:talk] Re: How to read I2C without specified device from FB Hi powertrick, i am trying to read and write data to registers of a controller from my arm board through Codesys. if you have managed to make it work, can you share...
.
I2C_master.write(16#68, 16#15, 1); I2C_master.read(16#68, ADR(datatoget), 2); //2 the is for 2
Bear in mind the following: We are interacting with a device with 16 bit data words so adjust accordingly for 8 bit data words In our case we created a function method to read and a method to write the devices and this is not shown supporting small/big endian and also 8/16 bit data words so it can get very complex We struggled so spent some time to master I2Cget and I2Cset (I2Ctools) on the linux terminal to cross check the device interaction..do this first and master it to save your sanity ie. 1)...
Bear in mind the following: We are interacting with a device with 16 bit data words so adjust accordingly for 8 bit data words In our case we created a function method to read and a method to write the devices and this is not shown supporting small/big endian and also 8/16 bit data words so it can get very complex We struggled so spent some time to master I2Cget and I2Cset (I2Ctools) on the linux terminal to cross check the device interaction..do this first and master it to save your sanity ie. 1)...
Bear in mind the following: We are interacting with a device with 16 bit data words so adjust accordingly for 8 bit data words In our case we created a function method to read and a method to write the devices and this is not shown supporting small/big endian and also 8/16 bit data words so it can get very complex We struggled so spent some time to master I2Cget and I2Cset (I2Ctools) on the linux terminal to cross check the device interaction..do this first and master it to save your sanity ie. 1)...
Bear in mind the following: We are interacting with a device with 16 bit data words so adjust accordingly for 8 bit data words In our case we created a function method to read and a method to write the devices and this is not shown supporting small/big endian and also 8/16 bit data words so it can get very complex We struggled so spent some time to master I2Cget and I2Cset (I2Ctools) on the linux terminal to cross check the device interaction..do this first and master it to save your sanity ie. 1)...
Bear in mind the following: We are interacting with a device with 16 bit data words so adjust accordingly for 8 bit data words In our case we created a function method to read and a method to write the devices and this is not shown supporting small/big endian and also 8/16 bit data words so it can get very complex We struggled so spent some time to master I2Cget and I2Cset (I2Ctools) on the linux terminal to cross check the device interaction..do this first and master it to save your sanity ie. 1)...
Bear in mind the following: We are interacting with a device with 16 bit data words so adjust accordingly for 8 bit data words In our case we created a function method to read and a method to write the devices and this is not shown supporting small/big endian and also 8/16 bit data words so it can get very complex We struggled so spent some time to master I2Cget and I2Cset (I2Ctools) on the linux terminal to cross check the device interaction..do this first and master it to save your sanity ie. 1)...
Yiedermann thank you for the snippet as my codesys is reading an i2c slave.....any chance you know how to write to a slave as I tried anything I could think of. Seems the usage mimics the I2C method comparing the read so for write I tried below: datatoread: ARRAY [0..1] OF BYTE := [2(0)]; I2C_master.write(16#68, 16#15, 1); I2C_master.write(16#68, ADR(datatostore), 2);
Any ideas would be highly appreciated for my issue: Using lastest Codesys SP16 Patch2 64bit with a purchased Codesys Azure IoT hub store library example PC Node Red will interact with the IoT hub fine Codesys runtime on ARM PLC only flags an error I am sure I have the correct deviceId, SAS etc that I checked against the VCS and also Device Explorer app Not sure what to do next as I do not know if there is a log on the hub or inside my Codesys IDE to see more about the error. The hyperlink for the...
Any ideas would be highly appreciated for my issue: Using lastest Codesys SP16 Patch2 64bit with a purchased Codesys Azure IoT hub store library example PC Node Red will interact with the IoT hub fine Codesys runtime on ARM PLC only flags an error I am sure I have the correct SAS that I checked against the VCS and also Device Explorer app Not sure what to do next as I do not know if there is a log on the hub or inside my Codesys IDE to see more about the error. The hyperlink for the Device Explorer...
Any ideas would be highly appreciated for my issue: Using lastest Codesys SP16 Patch2 64bit with Azure IoT hub example PC Node Red will interact with the IoT hub fine Codesys runtime on ARM PLC only flags an error I am sure I have the correct SAS that I checked against the VCS and also Device Explorer app Not sure what to do next as I do not know if there is a log on the hub or inside my Codesys IDE to see more about the error. The hyperlink for the Device Explorer is wrong so I think that it has...
Any ideas would be highly appreciated for my issue: Using lastest Codesys SP16 Patch2 64bit with Azure IoT hub example PC Node Red will interact with the IoT hub fine Codesys runtime on ARM PLC only flags an error I am sure I have the correct SAS that I checked against the VCS and also Device Explorer app Not sure what to do next as I do not know if there is a log ib the hug or inside my Codesys IDE to see more about the error. The hyperlink for the Device Explorer is wrong so I think that it has...