Accessing Simatic 505 PID Loop

Avex

Member
Join Date
Oct 2005
Location
Auckland
Posts
6
Hi all,
I've got a TI 505 PLC and am using Honeywell Experion R210 as my HMI. Am using KEPware as my OPC server as Experion does not have driver for TI505.

I'm having trouble accessing the Set Point of a PID loop in TI 505 so that i could display on the HMI. I do not know where the memory of the PID loop is mapped to, all i know is the PID loop is stored in S-Memory. However i have no idea how the memory is allocated or where you can specify the memory allocation. Can anyone help?


Does the STW (Status Word) memory has anything to do with S-memory?

Cheers
 
Hi Avex

In TI-speak, all the loop data is accessed as variables of the form Lttnnn

tt are text which specify the particular characteristic of the loop you want, e.g. tt can be SP, PV, MN for Setpoint, Process Variable, Output. There must be about 20-30 different attributes you can select for each loop.

nnn is a numeric portion which specifies which particular loop you are referencing.

Thus LSP1 would be the setpoint of loop 1; LTI28 is the integration time of loop 28 etc.

You really need to get a hold of the TI Programming Reference Manual which gives a complete breakdown of all these options. As far as I know it's still available as a download at http://www.sea.siemens.com/automat/product/plc/505/au505man.html

(oh, and no, STW status words don't refer to S-memory. These are read-only data updated by the operating system reporting on the health of the system as a whole - I/O, battery, scan times, real-time clock, etc, etc. S-memory was used as the original designator for any program memory not associated with ladder i.e. Special memory where loops, alarms, SFPGMs etc are executed.)

Regards

Ken
 
Follow Ken M's advice and get the reference manual. There is a complete chapter on loops. You may want to look up loop V-flags as well. The V-flag is the loop status word. You can monitor the bits in the word, and display the loop's status, manual, auto, cascading, yellow deviation, orange deviation etc....

I usually use a cyclic special function with indirect addressing and a for next loop to map the loop varibles to V-memory. Some HMI packages cannot access the loop directly.

Ken
 
Thanks for the responses :)

First of all, thanks for the response. Really appriciated.
I actually have the reference already, and i also know that the LSPnnn is the Loop Set Point (where nnn is the loop number).

I think the LSP, LPV, Lxxx, etc are all internal memory/variable for the PID loops. My task is to read/write it via an OPC server, in my case i'm using KEPware. However KEPware can only access C, K, V, S, STW memory and is not able to read LSP, LPV, Lxxx, etc...
Perhaps its the limitation of the OPC server?

I think (but i could be wrong) that each PID loops occupies a block of S-memory. Because whenever i create or delete a pid loop the "S-memory available" increases or decreases. I'm hoping that there is a mapping reference to the S-memory (eg. S0001 = PV, S0002 = SP, S0003 = OP, S0004 = Kp, etc...) OR is the S-memory assigned dynamically?

(Basically all i'm trying to do is to display SP on the HIM so operators can change it)


Cheers
 
Here's a screen shot of a setpoint mapping SFPGM:

LOOP.JPG
 
(wow, this a real follow-the-sun thread!)

Effectively S-memory in itself has no direct access addressing. It is entirely dependent on what purpose it is used for. For example, you could have a PLC with 30K of S-memory and fill all of that with SFPGMs (Special Function Programs). There would be no room for loops or alarms etc. Since this would all be code there is no 'address' corresponding to these elements of code. Equally you could configure a bunch of loops there and have no room left for anything else. Now you would have all these loop variables available.

If the OPC server can not access Lxxx variables directly then you genuinely have no option but to move them to an area of memory which it can access, just as the other Ken has said. His solution is not only elegant and clean but entirely typical of how this 'problem' has been handled by TI programmers since operator interfaces were first developed. It's entirely possible that the OPC server developers will have constrained their work to generic types of variables which are available in all PLCs - i.e. bit registers, word registers, timers, counters etc. When someone like TI was ultra-clever and gave really easy access to embedded PID loops that was perhaps a bit too specialised and KEPware decided to stand back on those areas.

Good luck and regards

Ken
 
Thanks

Onces again, i must thank you both, Ken M(Sc) and Ken Moore(US) for taking time to answer my questions. I'm sure there are alot of things that you could do than to solve someone elses problem half way accross the globe. So I really appreciated your inputs.

My project is just simply create screens for operators on Honeywell's Experion HMI builder to replace a TISTAR HMI. Someone else (not in my company) wrote the Simatic 505 program, so i'm a bit reluctant to change their code as i would be taking on responsibility of someone else's work...

I was just hoping that i could just tap into their program and retrieve the required information to be displayed on the HMI, guess its not that easy after all. Seems like its going to be a show stopper for my project. The guy who gave us the project convinced us that KEPware could access all memory type in Simatic 505 PLC and we accepted it on that basis. So far i haven't found any documentation that suggest KEPware could access Lxxx (loop) variables or S-memory.

Guess my boss won't be too happy about that, at least i don't have to feel too guilty of my incompantance of not being able to do this supposedly "easy" project.

Thanks Ken and Ken :)
 
If you are hesitant to alter the PLC program, then you could hire a "seasoned" TI programmer to do the mapping for you. Should be fairly simple, and not overly expensive.

I have several TI plc's connected to Intellution Fix32 SCADA systems, Fix32 does not support direct loop access either.

I have written one Special Function Program that allows all loop parameters to be monitoried and modified for 32 loops, even the tuning parameters, it's not that difficult. I actually use two V's per parameter, one for the HMI to write to, and a second one for the HMI to read. That way when a new value is entered via the HMI, you can see the value change on the read value, and know that the PLC has processed the change.
 
FasTrak SoftWork's OPC driver supports ALL of the Loop variables. We make the 32 Bit Windows PLC programming application for the 505 TI, called 505 WorkShop, and we fully support those variables in the programming software as well as specifically with our OPC driver. Please contact me for further information
[email protected]
 
Ah, Tistar, I remember Tistar. Wow, that takes me back. It used to be regarded as a bit more that just 'HMI' in those days.

Are you absolutely certain that the loop data isn't already being mapped elsewhere in the PLC? Although all the loop processing by the PLC's operating system would take place in S-memory as we've discussed, it may be that Tistar is reading/writing the data to V-locations just as Mr Moore does and that the PLC code is shuffling it around already. I guess it depends on who (and what - Tisoft or APT) wrote the code. Either way, there's a chance you should be able to generate a cross-reference listing, check if the Lxxxx variables are being accessed in PLC code, and find out if there is already a back way in. Although this wouldn't require writing any code, you may feel more comfortable if someone with more direct TI experience can examine the xref and code anyway. Perhaps Carolina Ken's suggestion of hiring a guru may be the best way in the long run.

( ... now then, once more round the globe ...)

Regards

Ken
 
Another point to keep in mind is that most communications between PLC & PC operate their fastest if the data is mapped in one contiguous section of memory (or in this case, V-memory). It cuts down on the number of reads & writes; so from an HMI architecture viewpoint, mapping all of this into V-memory may be something to look into.



Tom
 
If you are able to post your PLC program without violating any company policies, or contact me via Private Message if you don't want the entire world to see it.
I would be glad to take a look at it and check to see if the loop addresses are already mapped. If that isn't possible, we (the forum) could assist you with preforming the xref and search function.
BTW what software are you using? By mentioning Tistar I would suspect you would still be using the old Tisoft software, but you never know, it could be the newer windows based package. The new software is much better at listing all the uses of a particular address.

(the world continues to turn, lol)


Ken
 
Hi all,

Thanks to all the responses to my questions. I found out why I can't access the S-memory (PIDs and SFPG), its the limitation of the driver that i'm using. I'm connecting to the Simatic 505 PLC via RS232 and it is not possilbe to access the S-memory. However, if i was to use ethernet verion of the driver then all the problem would be solved.

The Simatic 505 Ethernet driver for KEPware is able to access all memory types, including all PID parameters. e.g. LSP (set point), LPV (process variable), LPVH (pv high limit), LPVL (pv low limit), etc.

I haven't actually look through the other drivers the KEPware supports. But i'm now certain that if you wish to access the PID loop variables or Alarm variables, Simatic 505 (RS232) driver is NOT the way to go!

Thought you guys might like to know this :)
 
Thanks Avex. Hope it works out for you. As I mentioned in previously, if you want, you may look at FasTrak's OPC driver that supports all the variables, and does so in ALL communication methods - (Serial, TIWAY, TCP/IP, H1, FMS). It is the same driver that we use for the 505 WorkShop that supports everything TI 500/505 series.
[email protected]
 

Similar Topics

Hi all, I'm a bit confused. In the siemens manual "SIMATIC S7 Distributed Safety - Configuring and Programming" there is a section regarding...
Replies
2
Views
5,594
For the past few day, I have had problems accessing the Rockwell Knowledgebase. When I try to access it (and I do have a TechConnect Support...
Replies
7
Views
370
Hi, Small issue i've really been beating myself up over today. I've been working with Panelview panels for years. Currently working on an older...
Replies
1
Views
575
Dear experts, I have the following setup: CPU-313C (6ES7313-5BF03-0AB0 V2.6) + CP343-1 (6GK7343-1EX30-0XE0 V2.0) communicating with Siemens PC...
Replies
7
Views
2,627
I'm looking to replace an AB PanelView 600 2711-K6C2 HMI with a C-more EA9-T10WCL. The PLC in the system is a SLC 5/03, which is staying. I...
Replies
2
Views
1,230
Back
Top Bottom