Xavier2x

MrPLC Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Xavier2x

  • Rank
    Hi, I am New!

Profile Information

  • Country Belgium
  1. CODESYS

    CoDeSys V3.5 and my main PLC_PRG is in ST. I tried to do the same as you did. Even with the IL in the main program. My codes are exactly the same written but I still got those errors. I don't understand.. :(
  2. CODESYS

    Thank you for replying. But that solution only worked for me for FBD, ST and LD. Not for IL. So to be clear: PROGRAM PLC_PRG VAR INSTANCE_FBD: StartStop_FBD(); INSTANCE_LD: StartStop_LD(); INSTANCE_ST: StartStop_ST(); INSTANCE_IL: StartStop_IL(); END_VAR INSTANCE_FBD(); INSTANCE_LD(); INSTANCE_ST(); INSTANCE_IL(); (*This one does not work correctly and I get the following errors, seen below) I get the 3 following errors: - C0007: Expression expected instead of 'OR' (OR) - C0007: Expression expected instead of 'AND' (AND) - Accu must be loaded properly before this statement (S) These errors do count for the code written in the IL function block, here: LD Start_IL OR Light_IL ANDN Stop_IL S Light_IL But the code in the PLC_PRG is causing these errors. Can someone help please?
  3. CODESYS

    I think I know what's causing the problem. I made a Function Block (StartStop_IL) in IL and wrote the following code: LD Start_IL OR Light_IL ANDN Stop_IL S Light_IL Then I tried to call this FB in my PLC_PRG with the following code: PROGRAM PLC_PRG VAR INSTANCE: StartStop_IL(); (* Making an instance of the StartStop_IL) END_VAR INSTANCE(); (* Calling the instance of the StartStop_IL) Now this is what causing the problem, by deleting this code the problems are gone. But I still want to call my Function Block...So the problem isn't solved. Does anyone know how to call properly a FB (IL) in your PLC_PRG?
  4. CODESYS

    Hi, I want to know how to work with IL (Instruction List) but even with a simple PLC code I get errors and I don't know how to fix them. GVL: Start_IL AT %IX0.4: BOOL; Stop_IL AT %IX0.5: BOOL; Light_IL AT %Q0.2: BOOL; ACT: LD Start_IL OR Light_IL ANDN Stop_IL S Light_IL I get the 3 following errors: - C0007: Expression expected instead of 'OR' (OR) - C0007: Expression expected instead of 'AND' (AND) - Accu must be loaded properly before this statement (S) Someone has an idea what I'm doing wrong?