Great question. Took me back in time to when I last looked at this area… Gota love stretching those rusty memory brain cells…
These areas are a little different, so feel free to ask any questions if the following is not clear…
From page 176 of doc 1465, the OptoMMP Protocol Guide;
F200002C is a read / write area were you can read what the current status is on the PID loop.
If its all good, it will be 0. If the input is below the input low scale, it will be 1, if above, it will be 2 and if the output has been forced to a user level because the input is out of range, it will be a 4.
Anything other than those three values will be ignored.
Since the PID is writing to that memory address every PID scan loop time, if you do happen to write anything there, it will be over written. (So yeah, writing anything there is a little pointless, but my point is, you can write to that address).
If you put the PID in manual and turn off the algorithm (F210 0054 and F210 0050), then you can set and clear those bits from address 30 and 34.
Why would you do this?
The main reason is to test any code that you may have in place that checks this address and actions any bits that might be set. For example, your custom Linux code might read address F200 002C and if the output has been forced, then send an email alerting a user of this fact.
You can test this email function then by turning off the loop and writing to the location.
Same deal then with the configuration flag memory locations 58, 5C and 60.
You can read and write to 58, but if you want to write to it without doing a read first, you can just write to 5C and it will add your value to the value in 58.
Same with turning configuration flags off, you [I]could[/I] do a read of 58, subtract what ever its going to take to change it to the value you want, or you can just write the value to mem map 60 and it will automatically do the subtraction/addition for you.
I was able to test all of the above by using PAC Manager.
I know you said you are using Linux (and I am a huge Linux fan), but if you can run PAC Manager on another PC or Laptop on your network (or try running it under Wine or Crossoveroffice) I think you will find it very helpful in testing and setting up your MMP code…
I simply fired up PAC Manager and took a deep dive into the manual and the MMP addresses on the PAC R Controller PID Loop area.
Only took a moment or two to understand that the manual was right (granted, a little vague perhaps) because I could change all the values and see the results in real time.
Lets know how you get on.