automationplcomronmotioncontroller

Omron CP1H PLC "An invalid argument was encountered" Error


When I connect to the Omron CP1H PLC with CX-Programmer and try to send a program, the following error is thrown:

enter image description here

I set the settings shown below by following the path "Control Panel/Clock and Region/Change date, time or number formats/Attional settings..." but the problem was not solved:

enter image description here

The existing PLC program can be compiled on the Windows 10 OS, but the error reported above is thrown on the Windows 11 OS.

How can I solve this problem?


Solution

  • This problem is caused by the IEEE Floating Point notation in function blocks.

    SOLUTION-1

    For example, the following constant representation causes this error:

    enter image description here

    When the above fixed representation is examined, the cause of the error will be understood:

    SOLUTION-2

    It is also possible to develop the function block as Structured Text to avoid the dependency on notation:

    RESULT:= LENGTH / INT_TO_REAL(25);