Mitsubishi FX IN 32BIT Counters

Problem with mitsubishi 32bit counter

I'm have problem understanding 32bit counters . After reading the FX programing manual . I've written a short piece of code to get a beter understanding or them .

[ m8000 ]--------------------------------[ c235 k1000000 ]
[ X0 ]-----------------------------------[ INCP D1 ]
[ X1 ]------------------------------------[ M8235 ]
------------------------------------------[ END ]

My understanding of this code .

C235 can't work still m8000 closes . This happens when the plc first starts up .
When X0 close the counter should count up as this is the trigger. ( It doesn't have to be in the code , but i've put it in to make sure the input works ) .
If x1 closes it changes the state of m8235, the counter should count down .

i've tested the code . m8000 has closed

x0 has been turned on and off . data reg d1 goes up . but the counter does nothing . I just can't see where i've gone wrong .

Regards steve

Sorry for the incomplete ist post some how most of it was lost
 
Which FX Plc ?

Brief look, your code is wrong, it works as you stated but not how you want.

What do you want to do ??
 
What is connected to X1?
If there is an encoder connected to X0, X1 the counter will change counting direction on every change of X1, which will result in erratic counting back and forth.
Also, verify that nothing else in the program writes to the counter or resets it.
 
Last edited:
Many thanks for answering my question.

I'm working on FX1N . There is no missing code . I have a switch on X0 and a switch on X1 . I thought if i toggled x0 on and off i could watch the counter go up . Then turn on x1. toggle x0 again and watch it count down.

Regards

Steve
 
When using Hi speed counters you cannot use the "X" inputs tied to the counters as this upsets the internal software, the code to drive the counter is internal, all you do is enable the counter then any input on the X0, x1 etc. will increment the counter.
 
if it is not high speed input, you could use your code:

[ X0 ]-----------------------------------[ INCP D1 ]

but this will be 16-bit counter. for 32-bit you have to double the register (here D10 and D11 used as one 32-bit counter)

[ X0 ]-----------------------------------[ DINCP D10 ]

note you can use odd registers as well like "DINCP D17" where counted value would be in D17 and D18 but this is not good idea.
you should always use even address for 32-bit (try to monitor them using Device Batch Monitor and you will see why)
 
Last edited:

Similar Topics

Good afternoon! i'm using a mitsubishi FX2N, and i need to compare the value of a 32bit counter with a D, ex.: compare a CN252 with D10. how can...
Replies
1
Views
3,234
Hi I have read the manual and cannot find my answer. I will be using a Double Word 32Bit Unsigned format to give me 0 - 2,147,483,648 in...
Replies
1
Views
2,879
how to communicate FactoryTalk Optix and Mitsubishi Q Series. I want to know the details of that
Replies
0
Views
36
I'm at a new job as the sole control engineer and trying to piece together where my predecessor left off. One machine I'm trying to get online...
Replies
2
Views
98
Back
Top Bottom