Hello,
I'm sure there's something I'm missing. I have to do a encoder project on an old Mitsubishi fx-64MR plc. I have A phase to X0 and B phase to X1 and am using high speed counter c251. The counter does work, but when I try to use the CMP (compare) instruction it doesn't work as I expect it to. I have done similar projects on newer plc's with success using the inline compare fuction, but this model does not support it. Here's a simple sample of the program
For those that don't know C251 automatically counts the A and B phase from x0 and x1. Like I said that part works, the problem is regardless of the count m100, m101, or m102 never turn on. I have used the CMP function before with no difficulties, but have never used it with a high speed counter. I even tried moving the value of c251 to d10 then do my comparisons, but d10 would never read the value of c251. Any help would be greatly appreciated.
I'm sure there's something I'm missing. I have to do a encoder project on an old Mitsubishi fx-64MR plc. I have A phase to X0 and B phase to X1 and am using high speed counter c251. The counter does work, but when I try to use the CMP (compare) instruction it doesn't work as I expect it to. I have done similar projects on newer plc's with success using the inline compare fuction, but this model does not support it. Here's a simple sample of the program
m8000
---11----------------------------------------(c251 k32367)
1
1----------------------------(cmp k100 c251 m100)
For those that don't know C251 automatically counts the A and B phase from x0 and x1. Like I said that part works, the problem is regardless of the count m100, m101, or m102 never turn on. I have used the CMP function before with no difficulties, but have never used it with a high speed counter. I even tried moving the value of c251 to d10 then do my comparisons, but d10 would never read the value of c251. Any help would be greatly appreciated.