Hello, I have a project in which I can choose the file config.txt to place in /opt/plcnext/projects/BusConductor. The selection is made in eHMI, so the user can select the local configuration during the startup of the plant. I have 20 different configurations and everything works perfectly. Now I have to define a configuration with no module, so I made a config.txt with just a „0“ inside. But the configuration doesn’t seem to work. This is what I get in the Output.log:
27.04.20 06:51:01.245 BusConductor.BcComponent INFO - Resetting local I/O driver...
27.04.20 06:51:01.274 BusConductor.BcComponent INFO - Done resetting driver.
27.04.20 06:51:01.274 BusConductor.BcComponent INFO - Creating local I/O configuration...
27.04.20 06:51:01.315 BusConductor.BcComponent INFO - Done creating configuration.
27.04.20 06:51:01.316 BusConductor.BcComponent INFO - Reading local I/O configuration...
27.04.20 06:51:01.322 BusConductor.BcComponent INFO - Done reading local I/O configuration.
27.04.20 06:51:01.322 BusConductor.BcComponent ERROR - Read local I/O configuration failed. Response message too short.Looking at the code I see the cause of exclusion (that comes before the file reading):
// Get the number of I/O modules detected
// TODO: Check the "More Follows" word (receiveData[3]), and handle the situation where
// there are more I/O modules than can fit in one message.
if (receiveData.size() < 8)
{
this->log.Error("Read local I/O configuration failed. Response message too short.");
return false;
}num_modules = receiveData[7];I tried commenting out just the „return false;“ and leaving there the error message, and it worked, even if the LED D is flashing:
27.04.20 08:09:07.732 BusConductor.BcComponent INFO - Resetting local I/O driver...
27.04.20 08:09:07.784 BusConductor.BcComponent INFO - Done resetting driver.
27.04.20 08:09:07.784 BusConductor.BcComponent INFO - Creating local I/O configuration...
27.04.20 08:09:07.826 BusConductor.BcComponent INFO - Done creating configuration.
27.04.20 08:09:07.826 BusConductor.BcComponent INFO - Reading local I/O configuration...
27.04.20 08:09:07.829 BusConductor.BcComponent INFO - Done reading local I/O configuration.
27.04.20 08:09:07.830 BusConductor.BcComponent ERROR - Read local I/O configuration failed. Response message too short.
27.04.20 08:09:08.831 BusConductor.BcComponent INFO - Loading local I/O process data mapping...
27.04.20 08:09:08.835 BusConductor.BcComponent INFO - Done loading process data mapping.
27.04.20 08:09:08.835 BusConductor.BcComponent INFO - Enabling I/O data output...
27.04.20 08:09:08.839 BusConductor.BcComponent INFO - Done enabling data output.What kind of errors could I face commenting out this check? Or any other solution? Maybe this check could be placed after the file reading? Thanks a lot!