You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 10th, 2019, 08:00 PM   #1
defcon.klaxon
Lifetime Supporting Member
United States

defcon.klaxon is offline
 
Join Date: Feb 2015
Location: Far NorCal
Posts: 427
C++ on Scadapack?

Hi all,

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.
  Reply With Quote
Old January 11th, 2019, 11:04 AM   #2
Bullzi
Lifetime Supporting Member
United States

Bullzi is offline
 
Join Date: Jun 2012
Location: Colorado
Posts: 1,380
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.
  Reply With Quote
Old January 11th, 2019, 12:30 PM   #3
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 993
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!
  Reply With Quote
Old January 11th, 2019, 07:01 PM   #4
defcon.klaxon
Lifetime Supporting Member
United States

defcon.klaxon is offline
 
Join Date: Feb 2015
Location: Far NorCal
Posts: 427
Quote:
Originally Posted by Bullzi View Post
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.
Thanks for any help you can provide!
  Reply With Quote
Old January 11th, 2019, 08:51 PM   #5
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 993
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.
  Reply With Quote
Old January 12th, 2019, 02:12 AM   #6
defcon.klaxon
Lifetime Supporting Member
United States

defcon.klaxon is offline
 
Join Date: Feb 2015
Location: Far NorCal
Posts: 427
Quote:
Originally Posted by Saffa View Post
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.
  Reply With Quote
Old January 12th, 2019, 03:32 AM   #7
Saffa
Member
New Zealand

Saffa is offline
 
Join Date: Feb 2012
Location: Bay of Plenty
Posts: 993
Quote:
Originally Posted by defcon.klaxon View Post

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.
  Reply With Quote
Old January 12th, 2019, 10:10 AM   #8
Bullzi
Lifetime Supporting Member
United States

Bullzi is offline
 
Join Date: Jun 2012
Location: Colorado
Posts: 1,380
Quote:
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.
  Reply With Quote
Old January 12th, 2019, 08:07 PM   #9
DwSoFt
Lifetime Supporting Member
Canada

DwSoFt is offline
 
Join Date: Mar 2012
Location: Alberta
Posts: 904
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
__________________
Dan Wiebe
-----------------
Automation Manager
Phoenix Energy Services
  Reply With Quote
Old January 15th, 2019, 04:47 PM   #10
Bullzi
Lifetime Supporting Member
United States

Bullzi is offline
 
Join Date: Jun 2012
Location: Colorado
Posts: 1,380
I wasn't able to get any real answers from my vendor on how to load C programs but he did point me to a great web page that has a lot of info on the ScadaPack. The address is: http://resourcecenter.controlmicrosy...shboard.action

I found this manual on that web page. There is also one on the SP300 using C++ but it is too big to post here.

Hope this helps.
Attached Files
File Type: pdf TELEPACE_C_TOOLS_USER_MANUAL.pdf (2.62 MB, 7 views)
__________________
There is never enough money to do it right but there is always enough money to do it again.
  Reply With Quote
Old January 16th, 2019, 11:33 AM   #11
defcon.klaxon
Lifetime Supporting Member
United States

defcon.klaxon is offline
 
Join Date: Feb 2015
Location: Far NorCal
Posts: 427
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.
  Reply With Quote
Old January 19th, 2019, 08:54 PM   #12
DwSoFt
Lifetime Supporting Member
Canada

DwSoFt is offline
 
Join Date: Mar 2012
Location: Alberta
Posts: 904
Telepace has its limitations for sure that's why I use isagraf sometimes. I wouldn't say they are a bad product though.
__________________
Dan Wiebe
-----------------
Automation Manager
Phoenix Energy Services
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Wondering how y'all feel about Isagraf for SCADAPacks (SCADAPack Workbench) defcon.klaxon LIVE PLC Questions And Answers 12 November 14th, 2018 12:06 PM
Clearscada & ScadaPack Alan Case LIVE PLC Questions And Answers 1 July 14th, 2018 08:46 PM
Importing IsaGRAF 3 project archive(.pia) Files to SCADAPACK Workbench akash11132 LIVE PLC Questions And Answers 0 June 20th, 2018 12:20 AM
ScadaPACK cyoung120 LIVE PLC Questions And Answers 5 November 29th, 2017 09:01 PM
trying to get SCADAPack to interface with existing serial radio system defcon.klaxon LIVE PLC Questions And Answers 25 January 22nd, 2017 12:13 AM


All times are GMT -5. The time now is 09:04 PM.


.