Hey All,
Understand its not electrically supported, but we would like to automatically reload our C++ runtime whenever the modules on an Axioline F are swapped. I'm currently looking at https://api.plcnext.help/api_docs_2020-3/classArp_1_1Io_1_1Axioline_1_1Services_1_1IAxioMasterService.html as the class that we will need to use to perform this. Our current CPP code is more or less: - ArpPlcGds_BeginRead for Arp.Io.AxlC/AXIO_DIAG_STATUS_REG - Check If it equals 0xE010 (i.e. F_BD_BIT - Bus Different) is set (This will be fleshed out more past proof of concept) - If it does, then call axioMasterService->ResetMaster(); axioMasterService->CreateConfiguration(0x0001); axioMasterService->ActivateConfiguration(0x0001); This currently produces logging like such (Noting endianess of what I'm logging is inverted from what the manual indicates): 13.12.21 06:44:09.995 root INFO - AXIO Status Changed from FFFF to E000 <-- Initialised & working 13.12.21 06:45:35.016 root INFO - AXIO Status Changed from E000 to C400 <-- Remove a DI16 module 13.12.21 06:45:46.019 root INFO - AXIO Status Changed from C400 to C410 <--- Remove another DI16 module 13.12.21 06:45:49.521 root INFO - AXIO Status Changed from C410 to E010 <--- Swap position of two removed modules (in an SE6) 13.12.21 06:45:49.521 root INFO - AXIO Status indicates a different bus configuration, hot reloading 13.12.21 06:45:49.814 root INFO - AXIO Status reload successful <-- Written after the reset/create/activate code above 13.12.21 06:45:50.314 root INFO - AXIO Status Changed from E010 to C000 <--- Result after code above Some of this code is gathered from the plcNext Bus Conductor example, however, I am sure I am just missing some crucial final step. We are essentially trying to automate "sudo /etc/init.d/plcnext restart" whenever the bus configuration changes (As currently, if I "hot-swap" two modules and run the restart it works perfectly). Please note that the module types are not changing here, purely for replacement if a module dies. Cheers, Joseph