Working on a project where the limitations of the Scadapack (Telepace Studio) instructions are really frustrating me. I was thinking of maybe trying something in C++ (Telepace Studio has that C/C++ Program Loader) but I can't find much on how to actualy develop C++ code for a Scadapack. Do I need a third party development environment? Is there documentation for instructions and etc? Been Googling for awhile but haven't come across much.

I am pretty new to ScadaPack and have no experience with the C/C++ programs, but here my thoughts.

First, what are trying to do that Telepace has you stuck? Maybe we can help you out there.

Next, what model of ScadaPack are you working with? Can you flash the ScadaPack to use the ScadaPack Workbench Software? Some of the older units cant be changed but I think all of the newer ScadaPack's can be flashed for Workbench. The reason why is that Workbench has all the IEC languages. So you can use Structured Text to write your program. That may help get you over the hump.

I have a meeting with my ScadaPack Vendor on Monday to go over some things. I will ask him about the C/C++ programs and see if he can help me. I will post back on Monday.

__________________
There is never enough money to do it right but there is always enough money to do it again.

They are still very new and I'm not sure if they're available over there yet but the 575 runs a Schneider Unity Pro style of logic so I'm pretty sure you'd be able to do pretty much anything with that.

I have a unit here calculating CRC tables using ST... about as Mathy as I normally get!

First, what are trying to do that Telepace has you stuck? Maybe we can help you out there.

Great question. This is a water treatment plant that has a remote pump station; said pump station has a Red Lion control panel HMI (the rest of the remote sites do not have a Red Lion panel, so why they had one here is beyond me, I wasn't part of the design process unfortunately). What the lead operator has asked is for is the ability to change settings both at the Red Lion panel, and at the HMI at the water treatment plant (Wonderware). The sites communicate via modbus over a radio.

So basically what I've done is I pack the bits into a 16 bit register that are read via the radio link, and pack the bits from the HMI into a second register and compare them. If the values don't match when the radio updates the values, then I know the settings have changed at the remote site, so I update the HMI values. If the values don't match and the radio hasn't updated, then I know the HMI values have changed and I send new values to the remote site.

That actually works pretty well. The problem I'm facing is how to compare integers and floating points. They're all sequencial in the register so they're easy to read, but I can't find a simple way to compare an array of values to another array. CMPB is the closest but the annoying thing is that the second array compared is overwritten by the index of any differences found. So I could create a ton of CMPU and CMPF blocks one at a time, but you can really only fit 3 or so per network and I have to do it twice; one comparison for when to write new values from the remote site to the WTP HMI, and vice versa.

Thus, I was wondering if writing structured text or C++ would be easier than setting up all that logic.

Quote:

Next, what model of ScadaPack are you working with

It's a Scadapack 357, new enough that it has an ethernet port and all the serials are RJ45s but old enough that it doesn't have the green Phoenix wire terminal blocks.

Quote:

Can you flash the ScadaPack to use the ScadaPack Workbench Software? Some of the older units cant be changed but I think all of the newer ScadaPack's can be flashed for Workbench. The reason why is that Workbench has all the IEC languages. So you can use Structured Text to write your program. That may help get you over the hump.

Good question, I'm not sure. I've only ever developed in Telepace Studio and haven't ever done anything in Workbench, so I'm not sure how big of a deal that would be.

Quote:

I have a meeting with my ScadaPack Vendor on Monday to go over some things. I will ask him about the C/C++ programs and see if he can help me. I will post back on Monday.

Ah, the problem of "one-way" data... this plagues many systems i know of. Your approach is good, but time consuming as you know.

If the registers are contiguous / in an array, could you not use a very basic form of CRC to check for change? Just loop through them all, add each value to a CRC register and then compare that CRC to the last one that was calculated?

Even if it took multiple scans to complete it wouldn't matter, no one's changing setpoints that quick! An additive CRC is less than perfect but highly unlikely that you would have one setpoint go up by the same amount that another goes down, in the same check cycle.

Maybe that's still too difficult to implement in Telepace, i haven't used it. Perfect application for ST though.

Ah, the problem of "one-way" data... this plagues many systems i know of. Your approach is good, but time consuming as you know.

Thanks for the vote of confidence on my approach for this problem. I thought about it for quite awhile and came up with a solution, it may not be easy to implement with Scadapacks specifically but at least my approach sounds reasonable.

Quote:

If the registers are contiguous / in an array, could you not use a very basic form of CRC to check for change? Just loop through them all, add each value to a CRC register and then compare that CRC to the last one that was calculated?

Good question. Your suggestion sounds like how I'm approaching this problem, but as you point out further down it's not clear if the instructions with Scadapacks easily allow such a solution to be found. If I was programming my preferred PLCs (Allen Bradley Control/Compact Logix), I could easily do this but the Scadapacks are stuck in 1984 so it's not that easy.

Quote:

Even if it took multiple scans to complete it wouldn't matter, no one's changing setpoints that quick!

Haha, I know exactly what you mean. I'm relying on that to compare the remote pump station data updates vs the HMI changes; obviously even if several scans are required, we're still talking milliseconds.

Quote:

Maybe that's still too difficult to implement in Telepace, i haven't used it. Perfect application for ST though.

This is my conundrum. Telepace Studio is ladder logic only, it sounds like "Workbench" allows all 61131 languages but it's a firmware change with additional software cost, and from what I understand the firmware change needs to be done by Schneider tech support in Canada. Being that ALL other sites are working, I would hate to switch to a development environment that is totally new, with which I have no experience, and try to port my existing code into a new system.

Worst case scenario, I hunker down and do a ton of new networks with the comparison blocks like I described before. It would take awhile but I could do it in theory. I was just hoping I could find a more efficient way. I'm already at over 50% memory eaten up in this controller and I could see that grow a lot with so many more networks.

Worst case, I have a great relationship with the client and I could just tell them choose one HMI over the other for writing, and they'd accept my explanation for how things are working.

This is my conundrum. Telepace Studio is ladder logic only, it sounds like "Workbench" allows all 61131 languages but it's a firmware change with additional software cost, and from what I understand the firmware change needs to be done by Schneider tech support in Canada. Being that ALL other sites are working, I would hate to switch to a development environment that is totally new, with which I have no experience, and try to port my existing code into a new system.

As much as change is a challenge especially if they have a large existing base of SCADAPacks, they will eventually need to migrate at some point in the future. My understanding is that the 57x range will become the standard once they have all the functionality of the 300 and 53x covered. The good news is that the Software for programming these, Remote Connect, is free. And all IEC languages are available. I ported all my M340 function blocks in Unity Pro, into work bench and it worked perfectly.

Worst case, I have a great relationship with the client and I could just tell them choose one HMI over the other for writing, and they'd accept my explanation for how things are working.

That is not a bad idea. Maybe just make the Red Lion tags read only so they can view the settings but if they need a change then they will have to call back to the control room and have them make the changes.

The other thing I was thinking about is the Red Lion has a C type of programming ability. Could you use that to do what you need?

__________________
There is never enough money to do it right but there is always enough money to do it again.

I have flashed many scadapacks to isagraf from.telepace without using Schneider. Workbench is newer and only for newer models than the 357.

It would make your task easier yes but I agree about switching now. Also telepace allows you to edit online. Isagraf does not.
The SP357 I believe is only C not C++. The SP32 is C++
I agree how you are doing it and I have done this before with Allen Bradley and modbus networking.
I'd love to help if you need more info

Hey guys, wanted to give an update. I've been talking with my rep and Schneider tech support but we haven't gotten a solid solution yet. I'm thinking I might just have to load the "destination" register in CMPB with my values and THEN do the comparison, which will take some timing in the code scan. That being said, I'm still not sure if the source and destination will go register by register, or if the comparison is with one source and then multiple destinations. I wouldn't be surprised if it was the latter, since that would be not nearly as useful but that just seems to be the MO of Scadapacks in general. God, do I hate them. Anywho, I'll let you know if I get a nicer solution than doing register by register comparisons manually.