Turns out Modbus was working despite the pre-compiler errors; I was reading the wrong addresses of the slave device, which was why I was seeing all 0s. Thanks for ignoring me.
Bumping for visibility, still unable to get Modbus working on this thing.
I'm having a tough time trying to get Modbus working on a Festo CPX-E PLC; it throws these pre-compiler errors as soon as I add in my Modbus TCP Master 3.5.12.30 to my project: I'm confused about the C0046 error, as I have IODrvModbusTCP 4.3.0.0 Library installed. So I thought maybe I needed to use the newest Modbus TCP Master 4.3.0.0, which is in my device repository: However, whenever I go to add this underneath the Ethernet adapter (which is version 4.2.0.0), the only TCP Master version available...
I have a project with a Festo CPX-E-CEC-C1-PN PLC (Run-time version 3.5.12.50) that I have been developing on just fine using Codesys V3.5 SP19 Patch 5 (64bit). I am at the stage where I wanted to use the Festo HMI screen, and have added a RemoteTargetVisu object to my application. After adding this object, I am no longer able to log in to the PLC as I get an Unresolved Reference warning for 'USERMGRUSERGETPROPERTY' towards the end of the download process. I was able to find this post (https://forge.codesys.com/forge/talk/Visualization/thread/fc686a6cb2/)...