SIEMENS driver Timers and Counters Config Error

Can somebody explain to me, what I’m doing wrong:


I want to read Timers and Counters from Siemens PLC S7-1500, but Ignition is always giving me Config error, no matter what I set in Tag Editor for Data Type. And the section in Ignition manual about Siemens is no help either…

Haven’t worked with Siemens with Ignition yet, but I’m going to guess you need to address the timer elements, rather than the timer root tag. Something like T244.x (x being the timer element you want to read).

Now you lost me… Since when the Timers in Siemens PLC have ‘elements’? :confused:

May not be the right terminology, but what I’m referring to is the fact the timer tag is a structure. I just looked up to confirm it uses the parameters with naming like TwinCAT. So for elapsed time, I believe you’d want T244.ET and for preset time you’d want T244.PT. You have to address each part individually like this, unless you create an Ignition UDT containing the components of the tag you want to connect to which takes just the root “T244” address (your UDT would have to address each individual part such as “PT” and “ET”).

I should add the caveat that I’m not in a position to test this and looking at Siemens addressing in the manual link it looks like it may not be this simple (nor does it give any more specifics on timers/counters than what you’ve done). I am guessing the root issue is the fact the timer has multiple parameters and you most likely need to address a single one of them at a time. If what I’ve noted above doesn’t work (guessing it may not), an email/call to support may be in order.

I never heard of this… and I’m working with Siemens for over 30 years…
What ‘structure’ you are talking about? Where are you getting this from? Where did you looked up to?

https://support.industry.siemens.com/cs/mdm/36932465?c=36351908107&lc=en-WW

Unfortunately, it’s not clear to me exactly how separate parameters (like “PT” & “ET”) are addressed in memory which it looks like you likely need to know given Siemens addressing in Ignition is a lot like Modbus addressing. Unless the Ignition Siemens driver automatically creates a structure for the different parts of the timer (PT/preset time, ET/elapsed time, Q/done), you would need to somehow address the individual part(s) you want to read/write.

zxcslo: It seems like your are still using the legacy Siemens timers while witman is referring to IEC timers, which are the preferred way to program timers with TIA (or almost any other Plc I know).
I am not sure if legacy timers are still accessible in S7-1500 cpu’s but I will check it tomorrow when I’m back at the office.

OK, now I know what you’re talking about :smile:
You are talking about IEC_TIMERS (TON, TOF, … which I/we never use…). For this timers, when you use them in PLC program, TIA portal automatically creates DB with the name IEC_TIMER_0_DB_X… And in this DB’s you can see the ‘elements/structure’ you are talking about (ET, PT, RU,…).
But… this system DB and these variables inside are only for PLC’s internal usage/purposes and are not accessible outside the PLC (to HMI, SCADA, PC,…AFAIK).
What I’m talking about are ‘legacy’ SD, SE, SS, SP, SF timers…
These have no structure and system DB’s… and no ‘element’…

And I didn’t realize there were ‘legacy’ timers! Sorry about that. I’d think there’d be another way, but if nothing else I’m guessing you could put some logic in PLC to copy values from timer to tags you can address successfully in HMI and vice-versa. But that’s pretty cumbersome. I suspect there is at least a way to address the elements in the IEC timers, but again, I’m going way out on an unfamiliar limb here. Good luck!

I Normally when I’m setting up a PLC to work with ignition I create a separate DB to be used by ignition. You can then turn off optimized access etc and it’s easier to address them as all the tags are DB100.??
For example.

I then move all bits required over to this one datablock with move blocks inside a FB.

I’ve gone away from using timers and use count up or count down blocks, triggerd from the PLC clock bit (needs enabled in the CPU). I have various blocks for counting hrs and days etc just from the 1 second clock bit.

These timers / counters can be Int or real which is easily brought over into ignition rather then trying to address timers.

Edited… I’m not at my laptop but rather then trying to address the actual counter, assign a int from a DB to the output, I think it’s PV.

That’s exactly how we are doing it, when we are the manufacturer of the machine and software.
But this is for another production line, which is not ours. We’re doing some mechanical changes and therefore some PLC program changes. And we convinced the owner to replace Siemens WinCC with Ignition…

IIf you have access to the PLC then as you say also, create a new DB and FB and move all the data needed over. In the FB you can play around with the data anyway you want to convert timers etc

This way the original program doesn’t get altered at all.

I too moved away from WinCC (not always due to costs) but on larger projects ignition is the way forward. We rely a lot on data logging and Wincc and csv files are no good. Our clients don’t like them as they can be “tampered” I now create auto generated PDF’s and email them out.

Edited. I’ve never tried it but WinCC can be set up as a OPC server. So ignition can pull data from WinCC rather then the PLC I’m not sure then how timers and counters will be addressed then. Maybe a work around.

Are you sure the Permit access with PUT/GET option is checked in the CPU parameters? That’s a newer option on the later firmwares that will deny outside connections by default for security reasons. It comes disabled by default on new CPUs.

He, He,… Of course, I did. All other 2500 tag work OK. :thinking:

After a test with a cpu 1512 i can confirm that it is not possible to access legacy timers with the S7 OPC-UA driver. This is not an Ignition problem, an other OPC-UA Server shows the same behaviour in S7 legacy mode.
I recommend to use a dedicated S7-1500 OPC-UA server. There are reasonable priced 3rd party servers that fully support the new S7 cpu’s with all security features.

Better yet, just use the onboard OPC UA server that FW 2.0+ has. Although you'll likely need the OPC UA Next module mentioned in some other thread to get the most out of it.

1 Like