PLC OS

W

Thread Starter

wexy

I have been following the PC vs PLC discussions and was wondering what OS PLC's run and how the data inside the PLC's cpu is manipulated. I am fairly new to the industry and am trying to understand the basics. Any help/info would be appreciated.
 
J

James Martin

I think a better question to ask would be "What is an operating system?"
If you define dos or unix as operating systems then I would think PLC's could be seen as having really low level operating systems that are usually hardware dependent and specialized.
 
C
IT DEPENDS ON MANUFACTURER HARDWARE DESIGN THERE IS NO LIKE DOS ,LINUX OPERATING SYSTEM FOR THE PLC'S .

IT ALL DEPENDS INSTRUCTIONS CODE (MECHINE LANGUAGE ) THE ONLY THING YOU CAN DIFFERENTIATE IS THAT WHAT OS SOFTWARE YOU HAVE TO COMMUNICATE FOR THE PLC'S . FOR EXAMPLE ALLEN BRADLEY PLC'S 6200 -IPDS SOFTWARE FOR DOS VERSION AND RSLOGIX-5 FOR THE WINDOWS VERSION .
 
C

Curt Wuollet

I believe most PLCs have what would be more accurately termed a real time executive program. It would have to include more general functionality to be termed an RTOS or OS. Of course, with hardware resource costs coming down there is no reason an RTOS or OS couldn't be used. As functionality is added, the line is blurred a lot and I'm sure some of these are becoming or have become operating systems in their own right. Soon, cheap hardware will make it uneconomic to write a new bottom layer for a project, especially with royalty free embedded software becoming avaliable for even the most stringent applications. Who knows, eventually you may be running a "linux PLC" and never know it. I believe GNU ECOS would be viable now. I'd like to hear some folks confirm of refute this as it's
interesting and kept awfully quiet. I'll bet QNX could rattle some skeletons.


Regards

cww

--
Free Tools!
Machine Automation Tools (LinuxPLC) Free, Truly Open & Publicly Owned
Industrial Automation Software For Linux. mat.sourceforge.net.
Day Job: Heartland Engineering, Automation & ATE for Automotive
Rebuilders.
Consultancy: Wide Open Technologies: Moving Business & Automation to
Linux.
 
N

Nijssen.Ronald

I would say that a PLC Operating System is the structure that provides an execution framework and access to resources (for example Data or Connections to other equipment)
Given this definition you could say that for a Siemens S7 the Operating System consists of its ability to create different priority tasks as so
named "OB's" and allocate User Data in Data Blocks. You can identify similar concepts in Allen Bradley's PLC's and those of other vendors
In fact, the PLC Operating System is the one thing that appeals users, the structure of the PLC that they like to use and provides them an environment suitable for implementing applications from simple logics to complex, large,
structured applications using different programming languages
A Large part of the PLC Operating System topology has been defined in standards like IEC1131, several vendors have modelled theirs in accordance
Interesting enough, several resources that a PLC program has could be exposed as "Computer" type Operating System managed entities as well, for
example Siemens provides an Ethernet CP card with built-in Web and FTP server. The Data Blocks that the program uses are exposed as "Files" on the
FTP side This also indicates that the PLC Operating System may become a basis for a
system that looks like a PC from one side and like a PLC from the other, changing the FTP server for a Windows OS Server driver (like Samba does with Unix) would make this happen

Kind Regards
Ronald
 
L

Lynn August Linse

>I have been following the PC vs PLC discussions and was wondering what OS
>PLC's run and how the data inside the PLC's cpu is manipulated. I am
>fairly new to the industry and am trying to understand the basics. Any
>help/info would be appreciated.

Many PLC companies have their own OS - some are merely "cooperative" round-robin schedulers with a few timer-based tasks. Others have full-blown
commercial RTOS like VxWorks (Wind River) within. Actually, it's not so much which OS is used, but how you use it.

As a small-resource embedded programmer, I cringe when I have to look at (just as example) "PLC" code written by Linux or Windows programs.
malloc()'s everywhere - tasks being spawned at will - etc. A regression tester's nightmare because success or failure is defined by a sequence of external events (ie: the order things are dynamically created/deallocated), and that can never be fully tested.

The few true PLC codes I've seen will (for example) start up creating 200 tasks (190+ sleeping) & everything is fully allocated once only & remains static until shutdown. Such a system just is - you don't have memory leaks,
you don't have a situation where running spawning 74 Web tasks at once prevents some more critical function. If you want up to 10 web tasks - you
start with 10 & always have 10. If you want 64 Ethernet/IP tasks (ie: connections) - you start with 64 tasks. Does it waste RAM, not really since
you have as much as you have. It's only wasted if you DON'T use it. A PLC-style preallocated system is defined to have enough resource of all kinds to do what it has to do repeatable 100% of the time.

Best Regards

Lynn August Linse, [email protected] http://www.linse.org/lynn
3 Rue Monet, Foothill Ranch CA 92610
Ph: 949-300-6337 Fx: 612-677-3253
 
C

Curt Wuollet

Hi Lynn

Lynn August Linse wrote:
>
> >I have been following the PC vs PLC discussions and was wondering what OS
> >PLC's run and how the data inside the PLC's cpu is manipulated. I am
> >fairly new to the industry and am trying to understand the basics. Any
> >help/info would be appreciated.
>
> Many PLC companies have their own OS - some are merely "cooperative"
> round-robin schedulers with a few timer-based tasks. Others have full-blown
> commercial RTOS like VxWorks (Wind River) within. Actually, it's not so
> much which OS is used, but how you use it.
>
> As a small-resource embedded programmer, I cringe when I have to look at
> (just as example) "PLC" code written by Linux or Windows programs.
> malloc()'s everywhere - tasks being spawned at will - etc. A regression
> tester's nightmare because success or failure is defined by a sequence of
> external events (ie: the order things are dynamically created/deallocated), > and that can never be fully tested.

I agree completely. As Einstein said: "Things should be made as simple as possible, but, no simpler"

> The few true PLC codes I've seen will (for example) start up creating 200
> tasks (190+ sleeping) & everything is fully allocated once only & remains
> static until shutdown. Such a system just is - you don't have memory leaks,
> you don't have a situation where running spawning 74 Web tasks at once
> prevents some more critical function. If you want up to 10 web tasks - you
> start with 10 & always have 10. If you want 64 Ethernet/IP tasks (ie:
> connections) - you start with 64 tasks. Does it waste RAM, not really since
> you have as much as you have. It's only wasted if you DON'T use it. A
> PLC-style preallocated system is defined to have enough resource of all
> kinds to do what it has to do repeatable 100% of the time.

On a VM architecture you have only the working set in core and page faulting takes time when you light up another task even if preallocated. Linux and some others let you lock pages in core to achieve much the same thing. I went to the extreme of reserving RAM outside the memory
manager to ensure reference consistancy and using static allocation. You can greatly reduce the uncertainty if you code for that purpose. If I need better than that, it's time for Realtime Linux.

Regards

cww

--
Free Tools!
Machine Automation Tools (LinuxPLC) Free, Truly Open & Publicly Owned
Industrial Automation Software For Linux. mat.sourceforge.net.
Day Job: Heartland Engineering, Automation & ATE for Automotive Rebuilders.
Consultancy: Wide Open Technologies: Moving Business & Automation to Linux.

 
Top