I am using a Mitsubishi Q Series PLC, Q06UDH.
I am trying to perform a modulus operation, to get a sample rate for data collection, i.e. I have a register R0 which constantly cycles between 0 and 3600, and a register W0 which is related to R0, whose value lies anywhere between -100 and 1300 depending on R0.
What i would like to do is take the value of W0, when the value of:
R0 % 100 = 0 (R0 MOD 100 = 0)
And store this data elsewhere to calculate the average value of W0
So I want it something like this.
--|R0 % 100 = 0|----+--|MOV W0 D0Z0|---
|
|
+--|INCP Z0|---------
Is there a operator I'm missing? Or a work around I'm not seeing?
In the end I decided to use a simple 0.1s clock to sample the data. It isnt quite as elegant and nice as I'd've liked, and took a bit of trial and error to get right, but it works.