Jump to content

Symbol 'xx' is the invalid data type(TIMER or COUNTER) in the SFC/ST program.


Recommended Posts

Posted
I have defined a variable "xx" as a Counter, and in ST language this code: CNTX(P_1min, condition, xx , 10); It runs sucessfully in a CJ2M CPU35, but if I do the same in a CJ1M CPU12, I get this error: That error is only shown if I have that instruction in ST languaje. Why is different in both PLCs? If I can't use a Counter variable in ST, how can I set the counter number in the CNTX function? I have tried CNTX(P_1min, condition, "C1", 10); CNTX(P_1min, condition, 'C1', 10);CNTX(P_1min, condition, 1, 10);CNTX(P_1min, condition, C', 10);but nothing runs. Thanks in advance
Posted (edited)
Hi, I have just tried to define "xx" variable as number, I put 1 as value because C1 is not possible with number type. And trying to compile I get this error in the CNTX line I don't understand why consider a variable of type number as literal, and if counter don't exist in CJ1M plc why says counter in the error message? Thanks a lot! Edited by wakeup

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...