
Val (Customer) asked a question.
How to connect P1AM-200 to C-more HMI using Circuitpyhton
Was wondering how I can control P1AM-200 which runs CircuitPyhton from C-more or any other HMI. I can only find Arduino code for Modbus TCP communication with C-more EA-9. Anyone knows about Modbus TCP or RTU code example or library for circuitpyhton I can use? Thanks!
Try the below to see if it gets you started:
Thank you for your code!
I uploaded board library to bundle-8 and installed uModbus but getting error 'no module named 'adafruit_wiznet5k.adafruit_wiznet5k_socket'
Checked bundle-8 and seems like there is no .mpy file with such name in adafruit_wiznet5k folder
Looks like our libraries are slightly out of date, I'll start digging into this and see if I can get everything corrected for you
Ok, so I'll need to get the public code updated, but I believe the fix for this is pretty easy.
Change:
to
and add this line before the mb_server declaration
Thank you. Code is running fine now but I still have trouble controlling P1AM-200 though C-more HMI, keep getting 'PLC communication timeout'. ETH module works, I can connect to Ethernet. When configuring panel I am choosing Modicon Modbus TCP protocol, using P1AM-200 IP and specifying 40002, 40003 and 40004 addressed for RGB LED color control. But no luck. Is it possible to share your CM5 project file for above code?
I tried multiple different CM5 Protocol Manager configurations but keep getting 'Ethernet test fail' message, below. Everything works fine in Arduino. So it has something to do either with uModbus parameters or its incompatibility with new libraries, last time it was updated is 2018..