BITS N BYTES Posted March 1, 2010 Report Posted March 1, 2010 I am really confused [or having a complete brainf*rt today] how to access the CPU Operating Mode in a CP1L. I need to use a flag within ladder to indicate whether the PLC is in RUN or MONITOR. Have searched the Omron forums but cannot find an answer. The PLC operation manual shows that value of Internal Address 81 could be used for this purpose. However how do I read the status of this Address into the program? I cannot figure out where Address 81 is located in the PLC Memory Map? PLC_Settings.pdf Memory_Map.pdf
Sergei Troizky Posted March 2, 2010 Report Posted March 2, 2010 (edited) This is highly unlike to be doable programatically. I would say "impossible", but never say "never". What is the goal? Edited March 2, 2010 by Sergei Troizky
PdL Posted March 2, 2010 Report Posted March 2, 2010 I believe it is possible through FINS commands, but I have to admit I have no idea how to do this "internally". However this adress 81 does look like it is possible somehow.
guys1808 Posted March 2, 2010 Report Posted March 2, 2010 " IF... " it is A81, it is a" Read-only Auxiliary Area " , try MOV A0081 DM0000
dfwise Posted March 2, 2010 Report Posted March 2, 2010 Are you trying to find out what state the PLC is in currently or just what it is supposed to boot up in? Because I think the first file you uploaded is only telling you what mode the PLC is supposed to boot to. It says it only reads that memory at start-up.
BITS N BYTES Posted March 2, 2010 Author Report Posted March 2, 2010 I am simply trying to read whether the PLC is in the RUN or MONITOR mode by reading the status of Internal Address 81 to a word in the PLC. If word = #8002 then mode is RUN, IF word = #8001 then mode is MONITOR. What I cannot seem to find is where in the memory map Internal Address 81 resides. It is NOTA81 always 0. I have monitored online the entire 1000 words of A memory and can find no word that changes between #8002 and #8001 when switching RUN and MONITOR. So WTF is Address 81 in the memory map. I cannot believe this is so difficult. [AB PLC's have a standard S: status word for this].
PMCR Posted March 2, 2010 Report Posted March 2, 2010 (edited) BITS N BYTES 81 is the internal address where Omron stores the startup mode of the PLC. I will brew you up a Function Block to give you the mode. Done... RunMonitorModeDetection.cxp Basically, I am sending the CPU an 0601 FINS command. I seperate the Mode and Status parts of the response out for you. The FB will only run when the PLC is running, so use a W or CIO area for the Outputs from the FB. These will go to 0 when the PLC is not running. So, Mode = 0 when the PLC is stopped, Mode = 2 when the PLC is in Monitor, Mode = 4 when the PLC is in Run. I left it all unprotected so you can see / edit. I tested it in a CJ1H-H CPU, but you can save the FB and use it in a CP1L. Edited March 2, 2010 by PMCR
Sergei Troizky Posted March 2, 2010 Report Posted March 2, 2010 (edited) Memory word 81 is not A81. This is an absolute address in PLC memory. Here you are. Reading word 81: Simpler than I imagined. Be aware, though, that memory word 81 is written on PLC power up and reflects the PLC mode on power up. It does not necessarily indicate the actual mode at any moment and you will not see any changes when switching the powered PLC mode. Edited March 2, 2010 by Sergei Troizky
BITS N BYTES Posted March 3, 2010 Author Report Posted March 3, 2010 Thanks for everyones replies. PMCR's FB is exactly what I needed. Works a treat.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now