Ok, today I finally had some time to test this.
So I connected my device (as described above) and I receive the following message: "Modbus not running (or something similar)".
Any ideas on how I can debug/fix this?
OK, so I successfully ran the demo on the Unipi, so that means the the configuration is done? I can just leave the RS485 on "disabled? I don't need to include anything in my program for the RS485 to be "enabled", besides of course the added modbus device.
As there are 2 ports, A and B, do I need to make any specific changes when adding a "device"? Or is it enough the set the address on the slave device and Codesys?
And I found the proper way to add the registers, so I'll give it a try tomorrow.
Me again; things are working out great and I'm very happy with the Unipi Neuron, so I keep on exploring more about it's functionality (and that of Codesys).
Next challenge, connect/communicate with a Modbus device. I'm trying to connect a CO2 sensor, which allows Modbus communication (I can also use analog output, but I have to connect multiple and then Modbus seems like a good solution).
Can someone point me in the right direction?
This is the datasheet/manual of the sensor: Manual
I've already added the Modbus_COM and Modbus_Serial_Device, but no I have no idea on how to make the "link" with the Modbus Map.
Eternal thanks for all your help :)
Hereby some screenshot on how I'm trying to read the AI, feel free to comment!
-> Line 27-30
-> Rank 3/4 (placeholder for conversion from input to what I need)
So this doesn't seem to work, any suggestions on putting the Unipi AI in the right mode (mA current, setAI21 and setAI22) AND on how to read the values (AI21 and AI22)
I'm trying to connect some pH and EC "water-quality sensors" and I have some issues in working with the AIs.
More information about the sensors:
The sensors are connected to a transmitter which has a display (so I can see the actual measured value) and it also has a 4-20mA (Active) output.
2 sensors (4-20mA) connected to AI2.1 and AI2.2, using the the 2 AGN next to each input.
Questions related to Neuron-Codesys
What is the correct way to configure the output to read "current"? I've added the necessary channels for reading the input and also to select the AI mode. AI2.1 seems to be in "current mode - 3" but I'm doing the same thing for AI2.2 and it doesn't read anything.
What values does it read? Because I'm seeing values like "10579" if I'm reading the analog input.
The value I'm reading is not stable at all and jumps all over the place, 7852, 10813, 9681... all for the same measurement. Any clues what this could be?
Hopefully you can help as it is one of the last steps to get our set-up running :)
As the Neuron has a RTC, do you need to configure anything on the UniPian or is everything already set-up?
Is there a specific procedure to follow to change the system-time?
What is your preferred method to read/out and use the RTC in a PLC program using Codesys. (I need it for a function that only runs between 0-20minutes of 16hours a day, for instance) -> I made a program like this before that ran on the Raspberry, but I'm sure it can be easier...
I will share the code tomorrow of what I had so far. Thank you.