Shop OBEX P1 Docs P2 Docs Learn Events
Propeller as a target for Codesys? — Parallax Forums

Propeller as a target for Codesys?

fixmaxfixmax Posts: 91
edited 2010-07-19 02:49 in Propeller 1
Hi guys. I have been reading the recent posts on getting the Prop to the average joe, and it touched on something near and dear to me that I have been thinking about for a quite awhile. I come from the industrial world where I design and build PLC and PAC-based control systems. Think of me as the average joe of the industrial world, your plain vanilla controls engineer with a background in PLCs (I do have some in microcontrollers as well, years ago).

I design and build a lot of industrial controls equipment, and I have always been very interested in using the prop, but really the only way I could see doing it right now is to interface the Prop through either a serial interface or an Ethernet interface of some sort, preferably through an industrial protocol such as Modbus TCP. There is nothing wrong with this per se, but it still requires an application to be written in the prop, which I would then interface to the PLC through a serial or Ethernet protocol.

Now, from a hardware point of view, I think the prop is more than capable of industrially hardened I/O control, a la Morpheus and it's derivatives (Bill Henning), but I see one major issue from this that is a bit overlooked, and that is the software side of the industrial equation.

As a PLC software guy, over the years, I have transitioned to an IEC6-1131-3 based programming IDE. This is pretty much currently the standard for most PLC and PAC manufacturers, such as Siemens, AB, Beckhoff, B&R, Phoenix Contact, Schneider Electric, etc. The advantages such an IDE gives are the common languages that are available across many different manufacturers, such as Ladder, Structured Text, Function Block, Sequential Function Chart, and Instruction List (yuck).

There is a company out there by the name of 3s-systems, that makes a software package named Codesys www.3s-software.com/ (also KW Software www.kw-software.com/. They have designed this software package to run on anything from chip based controllers all the way up to full blown PC based control systems. In fact, a lot of the major manufacturers out there are using Codesys or KW as their base software, and they build on it and customize it to their products.

One question I have, is would it be possible for someone out there in the Prop world to work with Codesys or KW to bring it to the Prop? Such as Parallax itself? This may seem to be something that is ludicrous on the surface, but as an systems builder, I would LOVE to be able to buy a pre-built product such as a Morpheus and run an IDE such as Codesys to program it. This would allow me to use a package and languages that I am familiar with, while leveraging the hardware capabilities of the Propeller.

As a current example of what Codesys and KW is capable of, I am currently designing systems that will have multiple controllers interfaced together over Ethernet. While this doesn't sound all that special, it will be with one software project file, with communication between controllers handled through network variables, which are kind of like super global variables. In past control system topologies, multiple controllers interfaced together in some fashion would each be running a program that was individually programmed and downloaded to the controller. This made management of the overall project complex and time consuming due to the interfacing issues between controllers.

The newer software allows all of the controllers to be programmed from one project file. This is the kind of like the industrial equivalent of multi-core programming, such as the prop, with each controller node having it's own localized IO. Localized IO is extremely important in that inter-controller communications can be through Ethernet, which not only is electrically robust (differential twisted pair) but also has a robust, hardware level error correction mechanism. This is important due to the electrical noise present in industrial systems, i.e ac motors, servos, etc.

If we could get IEC6-1131-3 language support on the prop, this would be a really good way to bring the prop into the industrial world. Getting the prop as a target in Codesys, would be an easy, powerful way to accomplish this (I think personally that Codesys is the better of the two).

This type of effort would be very synergic in my opinion. The Prop would get more exposure, 3rd part hardware solutions would also get a tremendous boost. Software tools such as Viewport and the Propscope would get huge boosts. The Prop coming to the industrial world, with its vast OBEX library, built in video, multicores, no interrupts would be a POWERFUL addition to the industrial world. Using the object oriented capabilities of Codesys, I could create re-usable libraries for the various functions of the Prop. These libraries could even be added to the OBEX.

As far as code protection goes, for me is a non-issue. If a package such as Codesys is used, software protection is built into the IDE. I wouldnt really be worried about someone simply copying the binaries from the prop, since the power of the system comes from the high level software source code, which can be protected easily in the IDE.

Now, I realize that the prop may not have the horsepower to run as a target in Codesys or KW, but even if I could get structured text or ladder logic, that could be a good start. Particularly a structured text and ladder logic compiler. This would put the prop within the grasp of a whole new market of people. I only suggest the Codesys or KW, since its a fully fleshed out IDE, which may be easier to do, I don't know.

To the Bill Henning's of the prop world, if the prop isn't powerful enough to be a target for Codesys, is it possible to build a PC based board with a Prop on it as an interface? This would give Codesys a target it could work with, while having the advantages of a Prop on board for the video and other functionality. Morpheus 3?

Just my 2 cents worth. Any opinions or comments, especially by all of the Prop language gurus out there?

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2010-07-18 19:05
    fixmax said...
    Hi guys. I have been reading the recent posts on getting the Prop to the average joe, and it touched on something near and dear to me that I have been thinking about for a quite awhile. I come from the industrial world where I design and build PLC and PAC-based control systems. Think of me as the average joe of the industrial world, your plain vanilla controls engineer with a background in PLCs (I do have some in microcontrollers as well, years ago).

    Hi smile.gif

    You are my main target market!
    fixmax said...
    I design and build a lot of industrial controls equipment, and I have always been very interested in using the prop, but really the only way I could see doing it right now is to interface the Prop through either a serial interface or an Ethernet interface of some sort, preferably through an industrial protocol such as Modbus TCP. There is nothing wrong with this per se, but it still requires an application to be written in the prop, which I would then interface to the PLC through a serial or Ethernet protocol.

    If no one else does it first, I will be implementing Modbus/TCP. I've done it before, under OS/2 and WindowsNT.

    For industrial networking for my products, I am standardizing on Modbus/RTU (over RS485 and RS232) and Modbus/TCP.
    fixmax said...
    Now, from a hardware point of view, I think the prop is more than capable of industrially hardened I/O control, a la Morpheus and it's derivatives (Bill Henning), but I see one major issue from this that is a bit overlooked, and that is the software side of the industrial equation.

    Thanks for noticing Morpheus [noparse]:)[/noparse]

    I think you will REALLY like the Morpheus+ and Mem* combination.

    You will also really like PLC-G (once I release it), and will probably like my I/O modules for all of my products - and most other Propeller boards, Stamps, et al.

    I will be looking at the software side, but I wanted to have a wide enough range of industrial products ready before I tackled that.
    fixmax said...
    As a PLC software guy, over the years, I have transitioned to an IEC6-1131-3 based programming IDE. This is pretty much currently the standard for most PLC and PAC manufacturers, such as Siemens, AB, Beckhoff, B&R, Phoenix Contact, Schneider Electric, etc. The advantages such an IDE gives are the common languages that are available across many different manufacturers, such as Ladder, Structured Text, Function Block, Sequential Function Chart, and Instruction List (yuck).

    I'll take a look at IEC6-1131-3, and if it is not encumbered with onerous licensing fees, will consider implementing it.
    fixmax said...
    There is a company out there by the name of 3s-systems, that makes a software package named Codesys www.3s-software.com/ (also KW Software www.kw-software.com/. They have designed this software package to run on anything from chip based controllers all the way up to full blown PC based control systems. In fact, a lot of the major manufacturers out there are using Codesys or KW as their base software, and they build on it and customize it to their products.

    Thanks for the link, I will check them out.
    fixmax said...
    One question I have, is would it be possible for someone out there in the Prop world to work with Codesys or KW to bring it to the Prop? Such as Parallax itself? This may seem to be something that is ludicrous on the surface, but as an systems builder, I would LOVE to be able to buy a pre-built product such as a Morpheus and run an IDE such as Codesys to program it. This would allow me to use a package and languages that I am familiar with, while leveraging the hardware capabilities of the Propeller.

    I will look into it - however it will take me one to two months to finish testing my new products and get them on the market; plus it looks like I just landed a large consulting project that will limit how much time I have to write propeller software for at least six months.
    fixmax said...
    As a current example of what Codesys and KW is capable of, I am currently designing systems that will have multiple controllers interfaced together over Ethernet. While this doesn't sound all that special, it will be with one software project file, with communication between controllers handled through network variables, which are kind of like super global variables. In past control system topologies, multiple controllers interfaced together in some fashion would each be running a program that was individually programmed and downloaded to the controller. This made management of the overall project complex and time consuming due to the interfacing issues between controllers.

    The newer software allows all of the controllers to be programmed from one project file. This is the kind of like the industrial equivalent of multi-core programming, such as the prop, with each controller node having it's own localized IO. Localized IO is extremely important in that inter-controller communications can be through Ethernet, which not only is electrically robust (differential twisted pair) but also has a robust, hardware level error correction mechanism. This is important due to the electrical noise present in industrial systems, i.e ac motors, servos, etc.

    I won't say I would have killed for that in the past... but I'd have seriously considered it.
    fixmax said...
    If we could get IEC6-1131-3 language support on the prop, this would be a really good way to bring the prop into the industrial world. Getting the prop as a target in Codesys, would be an easy, powerful way to accomplish this (I think personally that Codesys is the better of the two).

    This type of effort would be very synergic in my opinion. The Prop would get more exposure, 3rd part hardware solutions would also get a tremendous boost. Software tools such as Viewport and the Propscope would get huge boosts. The Prop coming to the industrial world, with its vast OBEX library, built in video, multicores, no interrupts would be a POWERFUL addition to the industrial world. Using the object oriented capabilities of Codesys, I could create re-usable libraries for the various functions of the Prop. These libraries could even be added to the OBEX.

    From the moment I first saw the prop I knew it would be an excellent processor for industrial applications.
    fixmax said...
    As far as code protection goes, for me is a non-issue. If a package such as Codesys is used, software protection is built into the IDE. I wouldnt really be worried about someone simply copying the binaries from the prop, since the power of the system comes from the high level software source code, which can be protected easily in the IDE.

    Now, I realize that the prop may not have the horsepower to run as a target in Codesys or KW, but even if I could get structured text or ladder logic, that could be a good start. Particularly a structured text and ladder logic compiler. This would put the prop within the grasp of a whole new market of people. I only suggest the Codesys or KW, since its a fully fleshed out IDE, which may be easier to do, I don't know.

    That almost sounds like a challenge ... [noparse]:)[/noparse]
    fixmax said...
    To the Bill Henning's of the prop world, if the prop isn't powerful enough to be a target for Codesys, is it possible to build a PC based board with a Prop on it as an interface? This would give Codesys a target it could work with, while having the advantages of a Prop on board for the video and other functionality. Morpheus 3?

    Just my 2 cents worth. Any opinions or comments, especially by all of the Prop language gurus out there?

    Achm... Bill Henning, Prop & language & industrial guru here... [noparse]:)[/noparse]

    I'll take a look at it. It sounds great, but I have to read the standard, see if it is encumbered, and look into Codesys before I can make a determination if it will fit my roadmap.

    At a minimum, I can assure you that my products will:

    - support Modbus/RTU RS485 & RS232
    - support Modbus/TCP
    - support industrial I/O standards (24VDC digital in/out, 0-5V analog in/out, later 4-20mA in/out)
    - have a killer price/performance for industrial applications

    Mind you, the above will take time, as I am currently testing my new products.

    FYI: My "485Plug", when used with 6/8 pin passive RJ45 connectors, follows the standard RJ45 Modbus RS485 pinout, and provides an optional terminating resistor, and a second RJ45 for daisy chaining. And if people prefer 3-screw terminals, those can be mounted as an alternate to the RJ45's...

    (485Plug actually supports balancing resistors for Profibus as well... shhhh)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • RossHRossH Posts: 5,519
    edited 2010-07-18 23:46
    @Bill & fixmax

    This sounds like an ideal application of the Propeller. One thing about the Propeller that always appeals to me is that it offers completely deterministic concurrency, unlike most interrupt-driven or multitasking environments.

    Surely this must mean that the Propeller would have great appeal in safety critical industrial applications where concurrency is required, but "provability" is also a big deal?

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • LeonLeon Posts: 7,620
    edited 2010-07-19 00:20
    That might require formal verification of the hardware design. I don't think that would be possible with the design techniques that were used. Formal verification of programs written in Spin and assembler would be required, also.

    en.wikipedia.org/wiki/Formal_verification

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • RossHRossH Posts: 5,519
    edited 2010-07-19 00:29
    @Leon,

    I'll let others comment on the hardware aspects - but you can get applications formally verified on much more complex hardware architectures, so I doubt that the Prop hardware presents a real problem.

    And as for the software (e.g. SPIN and assembler) - that's exactly the point. Unlike most assembly language applications, a concurrent application written in PASM is quite easily verified. Probably SPIN as well - mostly because the underlying concurrency model can itself be formally verified. Although in practice I expect you'd use a language more suited to industrial control, and not SPIN or PASM.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • fixmaxfixmax Posts: 91
    edited 2010-07-19 00:40
    As far as safety critical applications go, I would be comfortable using a chip that I had thoroughly tested and debugged for the application I would be using it for. The equipment I design is not built for general sale and consumption by end-users. It's a valid point though, and I would do a LOT of testing with it before I went to the field with it. I generally have to do this with all of the various hardware pieces I use anyways, even with "formally verified" components. You'd be amazed at what dies a miserable death in proximity to a welding arc.
  • AribaAriba Posts: 2,690
    edited 2010-07-19 01:57
    I am also in the Industrial control buisness a bit, and I had a look at Codesys 2 month ago.
    I think their buisness model is a real problem to port it to a Propeller chip:
    www.3s-software.com/index.shtml?en_businessmodel

    As I undestand this, they make the port to the Prop, and then we have to pay a license fee for every
    device and also a annually fee.

    Andy
  • RossHRossH Posts: 5,519
    edited 2010-07-19 02:26
    @Ariba,

    My company is also in industrial control (do you think the Propeller attracts us particularly?) and I certainly agree that the CoDeSys model is not a good one for anyone except CodDeSys (I don't blame them for that, of course!).

    However, their product is just a development tool for various industrial control languages. There are also GPL licensed alternatives such as UniSim (http://wpage.unina.it/detommas/unisim). Note that I have not actually used any of them, and certainly don't endorse them. Personally, I don't even like any of the IEC61131 languages much.

    However, that's all beside the point - all of these languages are are fairly trivial to implement, and one (or more) of them might be quite suitable to a very small Prop-based industrial control system. Or you can "roll your own". Of course, the industry is already littered with such things, so I certainly wouldn't suggesting anybody launch into this without doing a bit of research first!

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
  • fixmaxfixmax Posts: 91
    edited 2010-07-19 02:28
    Actually as an equipment builder, I wouldn't have any problem with that. The systems I build typically run between $75K to $125K+ so that cost isn't a big hit to me. I would sell a kidney to get Codesys or it's equivalent on the Prop...
  • RossHRossH Posts: 5,519
    edited 2010-07-19 02:49
    @fixmax,

    Then the people you want to go to are CoDeSys themselves. I can't imagine anyone here porting CoDeSys to the Prop just so CoDeSys can make money out of it - but they claim to be able to run on embedded archictures with no operating systems, so contact them and tell them you want to run their application targeted at a Propeller.

    That would be good for you and good for Parallax.

    Ross.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Catalina - a FREE C compiler for the Propeller - see Catalina
Sign In or Register to comment.