wakeup

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

4 posts in this topic

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

Share this post


Link to post
Share on other sites
The "timer" and "counter" data types only exist in the CJ2 although CX-P will default to them in other PLCs. You need to change the data type to "number".

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
I'm not sure that you can use timers and counters in ST in anything but a CJ2. I recall reading somewhere that they didn't work in a CJ1.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now