Student Strange
Hi,
I'm using openPLC for my project and this requires sending data from the firmware side to OpenPLC. More specifically, I need to send collected data from the embedded program in the firmware to PLC addresses such as MW100 or something like that. That way I can use this address in my LD program. Is this possible? Hope someone help.
 
Reply 0 0
Seafoxc
Okay, I will try to help you. Is it the firmware of the ESP8266 you mean or Arduino or ...? 
I have no Idea what I'm doing...
Reply 0 0
Student Strange
Thanks a million. It's firmware of ESP8266
Reply 0 0
Seafoxc
*edited: So you want to add logic in the slave device and write the result to a Word to openPLC runtime. 
This is possible but:
- You can not use all the Analog Inputs in open PLC (we will use an address to write the calculated result to. 
- The result and data you can send thru are limited by the hard set inputs and outputs set in openPLCruntime when using the pre defined slave device

I know a way to send the result as an Analog Input for open PLC. The ESP8266 had only one Analog output word so by using the default settings in open PLC runtime you can only send one word this way. Is this enough for your application? There is also an option to send some digital inputs. 
I have no Idea what I'm doing...
Reply 0 0
Student Strange
I'm planning to use just the A0 analog pin for my work
Reply 0 0
Student Strange
Yep. This is absolutely enough for my project. Btw, I'm also in need to send some digital input as well
Reply 0 0
Seafoxc
I don't have any experience with the ESP8266 chip. But I have experience with modding the Arduino Firmware this way. 
I have some ESP8266 laying around here and I will work on the project tonight. 
I already wrote some code but I can not compile it because I did not set up the libraries for the ESP8266 yet. 
You can test it and look at it to have the main idea but like I said I could not compile or test it yet.
If the program would work it should add a value of 40 on your input and if you disconnect the input it should put out 40. 
It can be you have to scale the value to have a correct input in open PLC ( * 64 for example).

I have to go to work so I will post my findings later. 

Good luck!
I have no Idea what I'm doing...
Reply 0 0
Student Strange
Thanks. I'll go for it.
Reply 0 0
Reply