iclim Posted August 29, 2014 Share Posted August 29, 2014 Hello, I am trying to run a PLC program which queries a register on a Macro station. according to the documentation, I thought the following command should work cmd"MacroSlaveRead %d,%u,%u",8,I920,P1; however the only method which I can get to work correctly is the following cmd"MacroSlaveRead %d,I%d,P%d",8,920,1; In my first method am I doing something incorrectly ? Link to comment Share on other sites More sharing options...
steve.milici Posted September 2, 2014 Share Posted September 2, 2014 The first method is incorrect as "I920" and "P1" are not valid representations - they may evaluate to integers but do not have the variable "names" "I" and "P" as literals in the "MacroSlaveRead" syntax. The second method should also accept "%u" as in cmd"MacroSlaveRead %u,I%u,P%u",8,920,1; Link to comment Share on other sites More sharing options...
Recommended Posts