Posted 9 Mar 2012 Hi again, I've managed to figure out all my Omron memory areas I've setup a trial OPC server (Kepware) and have added all my tags, and I see the different data values via an OPC client and see how they change when the program is running so I know that this map is correct. My problem now is that i cannot change the data via the OPC client. While the value changes in the client, e.g setting a channel in one of the OC222 I/O modules from 0 to 1 does toggle the relay/pump attached to it. I have set the plc into monitor mode, and according to Omron's doc's one can change things in this mode The OPC tags were created as read write What do I need to to to be able to change things via an OPC client? FWIW, I changed the PLC into monitor mode via CX1, and AFAIU, monitor mode permits changes even though a progrma might be running or is loaded. Do I need to be in "program" mode? I have a feeling I'm obviously missing something Would appreciate some help. regards, nikos Share this post Link to post Share on other sites
Posted 12 Mar 2012 Hi all, I was wondering if you "old" guys can shed some light on my problem, which I believe is similar to this this thread... my problem is the last post in this thread.... http://forums.mrplc....showtopic=22552 As said there, I can write an opc data item, but do not get a "physical" response, e.g. the pump does not come on.... I'll check my dip switches also and report back,, regards, nikos Share this post Link to post Share on other sites
Posted 12 Mar 2012 Thanx for the reply Bob, While I am not particularly fond of MS WIN, and the shitty ole dde, and stuff, this is what I have to make do with now Bob. Was hoping for some guidance on what's going on. Let me ask it another way. If the plc is put into monitor mode and it's running whatever program was loaded, does the plc see any execute changes that are sent to it? I guess I am trying to narrow it down to whether I have a "plc" issue or an "opc" issue. Actually, when I started down this path a while ago, I wanted to just go with straight serial, HL commands from my app, but "everyone" said use OPC as its easier and avoid vendor lockin, yada, yada... And in reality, I could gain some experience that is not tied into Omron only..... Regardless, my question still stands, regards, nikos Share this post Link to post Share on other sites
Posted 13 Mar 2012 What OPC client application are you using? What is the update criteria? E.g. are the OPC tags being polled by a fixed interval, or is the client application controlling this (also known as unsolicited updates). E.g. when your OPC client gives a command to set a bool tag, the OPC successfully sets the bit value in the PLC, but next the question is how this data value update is being directed back to the OPC client. Some clients support unsolicited updates from the server, e.g. only the changed data is being pushed to the client, when no change by the server is detected no update are done. Some clients have a "poll after set" setting that will force a read back of any "set" data actions. Have you enabled the diagnostics function on the Kepware channel? (general Channel setting tab) Next you can launch View > OPC diagnostics for a detailed view on all events. Some more information is needed here, I suggest you open a dedicated topic and I will move relevant posts to it. Share this post Link to post Share on other sites
Posted 13 Mar 2012 Hi again, At the suggestion of the admin, I've opened a new topic to help me resolve how to write data with an opc client. My previous post is at http://forums.mrplc....=0 and initially here.. http://forums.mrplc....showtopic=22552 As stated above I seem to be communicating with the kepware trial server and currently using its quick client to test. I guess the admin will move relevant posts to this thread and we'll continue from here.. regards, nikos Share this post Link to post Share on other sites
Posted 13 Mar 2012 Ok, What OPC client application are you using? I'm using kep own opc quick client to test as well as an SDK from http://www.hume.com/about_the_hume_DMH.htm which has a tcl/tk opc client methods. This is what I want to integrate into my application. I'm trying to use the kep quick client first to verify "writes" before I add another variable (Hume) into the mix. Tcl/tk let's make a really nice interface and I can connect alot of other functionality into my app. What is the update criteria? E.g. are the OPC tags being polled by a fixed interval, Using a fixed interval, 1000 ms or is the client application controlling this (also known as unsolicited updates). E.g. when your OPC client gives a command to set a bool tag, the OPC successfully sets the bit value in the PLC, Would this not mean that a valve should be turned on? It is not, and not in the client, nor in the server... but next the question is how this data value update is being directed back to the OPC client. Some clients support unsolicited updates from the server, e.g. only the changed data is being pushed to the client, when no change by the server is detected no update are done. Don't know how this is determined... Some clients have a "poll after set" setting that will force a read back of any "set" data actions. Have you enabled the diagnostics function on the Kepware channel? (general Channel setting tab) Next you can launch View > OPC diagnostics for a detailed view on all events. Have enabled diagnostics and getting a view on the events. Went to test mode and ran some tests, enabled test 2 the syncrous reads and writes, and I get syncronous read succeeded for group XX and syncronous write succeded for group XX... what else can I check... regards, nikos Share this post Link to post Share on other sites
Posted 16 Mar 2012 (edited) Did you try to write values directly from Kepware Quick Client to the PLC without your appication running? If this does not work, I suspect the problem is in the PLC. Maybe something in the ladder is writing over your change. Try using a bit that is not part of the program. Edited 16 Mar 2012 by EasyButton Share this post Link to post Share on other sites
Posted 19 Mar 2012 No, how do I stop the app from running from cx programmer? (sorry) I've also checked my dip switches and they seem ok 1-off 2-off 3-on 4-on 5-off 6-off 7-on 8-off As said, I'm able to put the plc into monitor mode via cx programmer, ok I am not able to "force on" anything from cx programmer, so I doubt opc would either... tia,, regards, nikos Share this post Link to post Share on other sites
Posted 19 Mar 2012 (edited) What model PLC? What memory area are you trying to force or write to? Post some screen shots please Edited 19 Mar 2012 by EasyButton Share this post Link to post Share on other sites
Posted 20 Mar 2012 Ok, I've managed to "force set" some memory areas in CX programmer. This is a CQM1H CPU51 system. I am also able to see the change in Kep's opc client (yeah), and my pump turns on. Now, all I need to do is be able to turn it on via opc Seems you have to click the monitor button and switch to the data type (boolean in this case) before the memory values and the force set buttons are available.. Also I can only "force on" here, if I try to "set value" I get an error dialogue "the point name and/or key specified is invalid". I'm trying to change IR100.03 from 0 to 1 so I have 100.03 in the start address box first shot is of the memory area in cx, as said this works second pic is from kep's opc quick client trying to do a syncronous write This does not work.. It is not reflected back into the main opc window, nor does it show up in cx programmer (above) pic. The log window says "Syncronous write succeeded for 1 items on group blah... that's where I'm at... regards, nikos Share this post Link to post Share on other sites
Posted 20 Mar 2012 Should not matter but do you have Asynchronous Write available? Is there a ladder program in this PLC and is the output you are writing to in the program? Try writing to a DM that is not part of the program. I keep coming back to the idea that you write is happening but the ladder is overwriting... Share this post Link to post Share on other sites
Posted 20 Mar 2012 Tx for the reply, Async did not work either... What's a good DM location to write to so I do kill anything.. regards, nikos Share this post Link to post Share on other sites
Posted 20 Mar 2012 Use Cross Reference Report to see what is used. I would try a low number, I am not familiar with the CQM but it looks like you need to stay away from D6000 and up. CrossRef.bmp CrossRef2.bmp Share this post Link to post Share on other sites
Posted 29 Mar 2012 Hello again, Yes there is a ladder program in the plc... what it does I've no idea, as I thought the scada/hmi is controlling the system. Success kind of... I have managed to do writes with an opc client, but only after setting the plc to stop/program mode. I thought that you could change anything in monitor mode??? Quoting Jay Anthony from 2005, in another post... http://forums.mrplc.com/index.php?showtopic=3674 "RUN= Look Only;Change Nothing;PLC Program is executed Monitor=Change anything but the PLC program itself;PLC Program is executed Program=Change any data or the PLC program itself;No Execution of the PLC Program" So, if the above is correct, and the output I'm trying to change must be in the program, since the scada turns it off and on, so I would NOT be able to change it in monitor mode. So, I guess this means the main logic is in the PLC, and the scada is only there for changing operational parameters, e.g how many liters of solution A (pumpA time on) to mix with solution B (pumpB time on).... So, it leads me to ask the following: Is there anything wrong with using software to control the system and use the plc only as a glorified wiring/relay closet? Is this commonly done? IMHO, it would also, question the usefulness of OPC concept in general for control, unless simply used only for data collection regards and thanks for all the help thus far, nikos Share this post Link to post Share on other sites
Posted 30 Mar 2012 You are misunderstanding Jay's message. Let me see if I can help to clarify. By "Change anything but the program itself", he means that you can change values in addresses, you can force bits on and off, you can do other manual operations, but the ladder logic program must remain the same (you can even change the ladder by using on-line edits). This does not mean that you cannot write to the PLC using an OPC Server. When you are writing to bits / words using OPC Server, you are not changing the ladder program, you are only changing values in memory addresses. Monitor mode is the mode that you want the PLC to be in for your application. If you are still having issues, it is unrelated to being in Monitor mode. Good luck! Share this post Link to post Share on other sites
Posted 30 Mar 2012 (edited) Well, my insight was short lived So, what could be going on? I consistently see that if I'm in monitor mode, OPC writes do nothing. I am able to, via CX, to force on/off some random relay, (in IR area), in monitor mode, which gives credence to what you're saying. Only when I go to program mode (STOP) am I able to opc write... I don't know where to look anymore. Maybe I should have gone along with my original thinking of just sending raw HL commands... I would have been done by now. Last question, would it matter whether the OPC server access is via the PLC's peripheral port or the RS232 port?? I guess I can try this and see... regards, nikos EDIT: Well just tried and the Kepserver does not run via the peripheral port on COM1, only the RS-232 port connected on COM2. Also, no opc writes in MONITOR mode, but ok in PROGRAM Edited 30 Mar 2012 by nikos Share this post Link to post Share on other sites
Posted 30 Mar 2012 You are trying to write directly to the outputs but when the ladder program is scanning (monitor mode), the ladder program is turning them back off. When you place the PLC in program mode, it stops scanning the ladder which prevents the program from changing the state of the outputs. Your next step is to dive into the ladder program and understand what it was designed to do. Then you can add to the program what is needed for integrating the OPC client to the program. It is not standard practice to leave a PLC in program mode and try to control it's outputs. HMIs are typically used to place the entire process into an "operating mode" allowing the ladder to perform the steps needed to complete the process. Example: "Fill tank push button" (OPC write) + "Tank not full" (Input) = "Tank fill valve" (Output). Did this system ever have a HMI on it before? If so, trying to mimic that is a great place to start. Bottom line, stop trying to write directly to the I/O. Share this post Link to post Share on other sites