MCP3424 with RedPLC

Hi.

I´m using 5 I²C modules for my Pi.
Today I´ve tried to work with an analog input 18bit, but I don´t know how to configurate it.
IA-address: 0
Dev-Type: mcp3424
Dev-Addr.: 68H
Mode of all 4 channels is 18bit, range is not important for now.

I connect the module together with the in- and outputs to the CPU.
But if I´m using the "rung start" and contacts like on the inputs, I´m getting always "true".

What I´m doing wrong ?

With kind regards,
Thorsten

Thorsten thin you only need one run output
I would say RedPLC was very much work in prog and think the developer has dropped it.
I think you need to consider a different approach as RedPLC is an attempt to do PLc scan like control on platform that isn't designed for that .

I´ve tried it with the i2c input, but no command was working, same on all inputs or outputs.
That´s why I´m using redplc.

In another case I´m using a PCF8591 for analog signals and that´s working fine with i2c in- and output.

Maybe you´re having an idea how to use PCF8574 and MCP3424.

Sorry I can't help I've only played with I2C years ago.
A quick search of forum shows

May be a different node like try on single mcp342x

I´ve installed the i2c node, but it´s not working, because I don´t know the command.

Ok let's approach this in a different way. You can call Python script from node red via the exe node. But start with the Python code on RPI get that working with the port expander
Once that is working you can look to process the output of the python script in Node-RED.

Hello Thorsten,
I am the devoloper of RedPlc.
After a long illness, I will continue to work on RedPlc.
The first part was digital handling (Contact, Coil, Timer..).
The second part is analog handling (Compare, Store ..).
But this takes time.
Sorry for that.
I know that RedPlc needs better documention and examples.
I work on it.
Ocean

2 Likes

@iiot2k sorry to hear your news & glad to hear you "back at the coal face" as we say in the UK :slight_smile:

1 Like

@iiot2k
Hi, hopefully you´re right after your long illness.
For now, digital handling is working fine and also easy to understand without documentation and examples.
For me it´s important to have the analog handling working, because I want to change my system and without MCP3424 it can´t work.
Maybe you know how to handle this chip.

Hi.

I´ve tried the example of the developer (Python & Tkinter) with Geany and it was working.
But it´s not working in node-red.
Maybe I´ve done something wrong, because Tkinter is not neccessary and I´ve deleted the lines.
Or maybe the function is wrong, because it crashed and I had to reload the backup.
You can find the example here.

@iiot2k What should be the output value with MCP3424 node ? I got blinking input/output message.

@iiot2k
Hi again.
After lost days for finding a solution I´ve find an adapter for iobroker.
On iobroker it´s working fine except the scale factor of 5.
Maybe you can talk to the developer. Here it is: GitHub - UncleSamSwiss/ioBroker.i2c: ioBroker adapter for I2C interface on Raspberry Pi, C.H.I.P., BeagleBone or Intel Edison