ArduinoIoT and ArduinoModbus libraries seem to be mutually exclusive in MKR 1400 GSM

The MKR 1400 GSM works perfectly as a Modbus RTU master through ArduinoModbus and ArduinoRS485 libraries.
It also connects without hitch to the Arduino cloud through its GSM modem in read / write and read-only mode. No problem.
When I try and use it as a crosslink between a Modbus slave and the IoT Cloud, it stalls and cycle-resets every 10-15 seconds and seems to be unable to get over the Setup() stage.
Ideas, anybody ?

hi
any chance you can share the Sketch with us?
maybe you have some blocking code which triggers the WatchDog

Hi, thanks for your interest.

Sure. Here is the ZIP file of the faulty project. I can send you the Modbus Master MKR functionnal module if you want, but the code is an exact copy of the one used here.

By the way, ArduinoModbus_S (for specific) corresponds to a redeclaration of "ON" an "OFF" alert between the original ArduinoModbus and ArduinoIoT. ArduinoModbus_S uses "On" an "Off" instead in the Modbus.c file.
Anyway the alert does not appear in the online editor, and I tried both libraries : Same-O.
The resets seem to occur just after Initproperties is done, which would mean when ArduinoCloud.begin starts (if uncommented, of course)

If think I will have a go at using another Modbus master library and see what happens.

Sorry, but comments are in French.
Feel free to ask for any information about it.

ACCS_AIOT_MBM_Test_oct13a.zip (48.4 KB)

@DG2RDD
you have commented the ArduinoCloud.update()
this is supposed to be running to keep connections alive as well as interact with Cloud and present events to the the Sketch

I know.
If I uncomment it in the current code and I load it to an MKR 1400 GSM equiped with a SIM, the system cycle-resets.
I also tried to insert a delay (commented too in my code) between the .begin end the .update, but it did not change anything.

So, any news on this front ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.