Has anyone had experience with the android sensors add on. I have a raspberry pi with codesys. I can't for the life of me get the android phone to send updated values to the codesys controller. If anyone has a basic example or has done this please show me the way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
just use the Project from CODESYS store.
Install it here:
After install you'll find the project here:
"c:\Users\<yourwindowsusername>\CODESYS Examples\SensorAppForAndroid\1.4.0.0\AndroidSensorApp.project"
-> then update the Project by rightclick to the project tree to your plc - set current compiler and current visu Profile.
one remark you need to remove the library netvarupd 3.5.5.0 from the Project (this seems to be a bug) it pulls automatcally current Version on compile after doing this.
BR
Edwin</yourwindowsusername>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One problem I have been having with the example program is that it includes two devices, Datagenerator and receiver. Do I load both devices to the raspberry pi and which one do I run?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the help so far but I am still unable to get it to work. I am getting a bunch of errors when I try to download to the device. Lets say I wanted to create a new project and just monitor screen rotation. How would I go about setting that up?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
the most important is this list here:
This must 100% fit, because These liste is exactly used in the android app to send the values:
The upper Application is only a dummy application to have this list accessible as receive list.
//This gobal variable list is received via the network.
//Sender: NVL [SensorDataGenerator: PLC Logic: DataGenerator]
//Protocol: UDP
Hello, I have a similar problem. I have an ifm Electronic HMI as PLC (CR1077) and y configure the network. When I use a Codesys Device it works, but when I update to my PLC 8CR1077) it does not work. Any idea to communicate my cell phone app (CodesysSensor) to my ifm Electronic HMI? It is possible?
I have not problem to connect on virtual Codesys PLC and receive data.
Last edit: davidredondo 2020-09-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would try to change the netvars broadcast address to a network broadcast...
the IFM device does probably not work with 255.255.255.255 change this to you network range 192.168.1.255 as example, if you net work is... 192.168.1.x probably the Linux in the IFM device does not support 255.255....
Hello,
Has anyone had experience with the android sensors add on. I have a raspberry pi with codesys. I can't for the life of me get the android phone to send updated values to the codesys controller. If anyone has a basic example or has done this please show me the way.
Hi,
just use the Project from CODESYS store.
Install it here:
After install you'll find the project here:
"c:\Users\<yourwindowsusername>\CODESYS Examples\SensorAppForAndroid\1.4.0.0\AndroidSensorApp.project"
-> then update the Project by rightclick to the project tree to your plc - set current compiler and current visu Profile.
one remark you need to remove the library netvarupd 3.5.5.0 from the Project (this seems to be a bug) it pulls automatcally current Version on compile after doing this.
BR
Edwin</yourwindowsusername>
One problem I have been having with the example program is that it includes two devices, Datagenerator and receiver. Do I load both devices to the raspberry pi and which one do I run?
Hi,
You just need to download the second one... first one is only placeholder for the netvarlist.
BR
Edwin
Thanks for the help so far but I am still unable to get it to work. I am getting a bunch of errors when I try to download to the device. Lets say I wanted to create a new project and just monitor screen rotation. How would I go about setting that up?
Hi,
the most important is this list here:
This must 100% fit, because These liste is exactly used in the android app to send the values:
The upper Application is only a dummy application to have this list accessible as receive list.
//This gobal variable list is received via the network.
//Sender: NVL [SensorDataGenerator: PLC Logic: DataGenerator]
//Protocol: UDP
BR
Edwin
Do I have to use the devices hotspot to connect the controller, or can they both just be on the same network interface?
Hi,
they need to be in the same network (android and plc)
BR
Edwin
Hello, I have a similar problem. I have an ifm Electronic HMI as PLC (CR1077) and y configure the network. When I use a Codesys Device it works, but when I update to my PLC 8CR1077) it does not work. Any idea to communicate my cell phone app (CodesysSensor) to my ifm Electronic HMI? It is possible?
I have not problem to connect on virtual Codesys PLC and receive data.
Last edit: davidredondo 2020-09-10
I would try to change the netvars broadcast address to a network broadcast...
the IFM device does probably not work with 255.255.255.255 change this to you network range 192.168.1.255 as example, if you net work is... 192.168.1.x probably the Linux in the IFM device does not support 255.255....
Last edit: eschwellinger 2020-09-10
Hello, many thanks for your answer.
I tested that but it doesn't work.
I attached a capture of my network area, maybe it is helpful
Does a ping work between Android Phone and IFM PLC?
Next is to have a wireshark trace..to check If you see the Udp telegrams in your network
Last edit: eschwellinger 2020-09-11