Programming Help Offer

R

Thread Starter

Rick Kephart

Hi All,

I just recently found this project and as such I have not had a chance to read all the archives. I am very interested in lending a hand in the
programming.

I have 10 years experience working for a major domestic DCS vendor. Most of which is in real time embedded software development (mostly in VxWorks and unix) and all in C. I have written both system level software, function
block/algorithms (including PIDs) and real-time TCP/IP communication drivers.

I am most interested in helping with the control program execution engine (I need to study the archives / specs / code to get up to speed with
exactly what you all are doing). I am also interested in helping with the function block / algorithm development (PID, Boolean/Ladder logic,
Auto-Sequence algorithm etc.). I assume that these parts are being worked on even when other parts are the "current topic".

I will help with whatever, but I do not have much experience with XML, Python or tcl/tk...so I am not much help with UI stuff.

Is it too late to help out with the programming?

If it is not too late, I am currently running Slackware 3.2. I'm planning on upgrading. Any suggestions from other developers????


Thanks

Rick


-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com



_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
C

Curt Wuollet

Hi Rick

Welcome!

It is never too late to help with the programming and we're glad to have you. There should be plenty to do in your areas of interest. We got into the UI stuff following some discussion about config files. If you feel like it fill out an entry for our "rogues gallery".
It's late, gotta sleep........

regards

cww

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
H

Harald Albrecht

Hello Rick,

> I have written both system level software, function
> block/algorithms (including PIDs) and real-time TCP/IP communication
> drivers.

Especially the last item you mentioned sounds quite interesting to me. Could you please give me some insights on the real-time communication topic with TCP/IP (or possibly UDP/IP)?

Harald


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Hello Rick Kephart,

welcome!

> I am most interested in helping with the control program execution
> engine (I need to study the archives / specs / code to get up to speed
> with exactly what you all are doing). I am also interested in helping
> with the function block / algorithm development (PID, Boolean/Ladder
> logic, Auto-Sequence algorithm etc.). I assume that these parts are being
> worked on even when other parts are the "current topic".

Yup - if memory serves, the latest addition to the CVS was a parser for
Instruction List / Structured Text, and it's a work-in-progress...

(Actually, there's an interim translator, but it's just a quick'n'dirty
Perl script.)


Hmm, maybe I should try to make some sort of roadmap, so that you know
what's where...

demo - there's just one demo in there, type "make" and watch the stars move
across. The only fancy thing is that it takes about 4 processes to
do that and they all cooperate the way they're supposed to.

doc - documentation. Such as it is.

drivers - anything that goes in the kernel

io - user-space I/O modules (including kernel-driver counterparts)

logic - logic modules, including the above-mentioned IL/ST parser, the
interim translator and a PID module

mmi - man-machine interface

smm - shared memory map. This is the infrastructure that connects together
the io, logic and mmi modules. There's also a couple of miscellaneous
libraries that don't really belong there.

> If it is not too late, I am currently running Slackware 3.2. I'm planning
> on upgrading. Any suggestions from other developers????

You'll need cvs (to get the code), flex and bison - I don't think we are
using any fancy libraries right now, so apart from that it's a plain C
development environment.


Jiri
--
Jiri Baum <[email protected]>
What we do Every Night! Take Over the World! Step 1 - bid for SMOFcon

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
M

Mario J. R. de Sousa

Hi Rick,

Welcome to the group.


Rick Kephart wrote:

> Hi All,
>
> (...)
>
> I am most interested in helping with the control program execution engine
> (I need to study the archives / specs / code to get up to speed with
> exactly what you all are doing). I am also interested in helping with the
> function block / algorithm development (PID, Boolean/Ladder logic,
> Auto-Sequence algorithm etc.). I assume that these parts are being worked on
> even when other parts are the "current topic".
> (...)

I have been mostly helping out with the smm, and tried to get a pid module going. Chetan Chotani [email protected] - it's on the list archives...) has done a specification (this too is also on the archives), but he seems to be a little overworked so hasn't much time to produce code (Chetan, please correct if I am wrong). Maybe if you and Chetan could come to an
agreement you could help him out there?
I have written some code for this module so Chetan could get an idea of how to link to the smm. I have just commited an update to this code which should allow it to work. Mind you, it is VERY basic code, so it will probably get thrown
away once someone else digs in. If you do decide to help out on the pid module, and manage to come to an agreement with Chetan, I can email you some details on how the current pid code is organized.


Cheers,

Mario.

--
----------------------------------------------------------------------------
Mario J. R. de Sousa [email protected]
----------------------------------------------------------------------------


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
C

Chothani, Chetan

Hi Rick,

If you would like to work on the PID module it would be a great help. Mario and I have put together the spec for the PID Block and I recently completed putting together the structure for the PID function call (as shown below). Next task is to actually start coding. I'm hard pressed for time currently due to some re-organization here at work and so on.

Some Notes first:

1) Timing: Mario will confirm the final decision on this. I'm assuming some higher level Module will manage the timing and call the PID function on a timely basis.
2) Structure: Not sure if a higher level module will populate the PID structure or if the PID structure is going to have pointers to LPLC points from where to obtain the data?
I think the best option is to have the structure contain an array of pointers to the lplc io map and the PID code then reads the data into local variables. This way we will be able to implement the lego blocks type approach.
3) The call would be something like: lplcpid(&pid)
4) The actual algorithm is contained in the PID spec in the archive documents.

The Structure:
The following are the values that the PID structure will include:
***NOTE*** If we decide to include only pointers in the PID struct then
the following struct will be an array of pointers and the actual
memory/point
location will hold the data for these values.

Struct PID{
/** Config Stuff Here **/
hscale as Float /** PV High Scale **/
lscale as Float /** PV Low Scale **/
hhlim as Float /** PV High-High Alarm **/
hlim as Float /** PV High Alarm **/
llim as Float /** PV Low Alarm **/
lllim as Float /** PV Low-Low Alarm **/
devlim as Float /** PV Deviation Alarm **/
dband as Float /** PV Alarm Deadband **/
xfailh as Float /** PV Transmitter Fail Lim High **/
xfaill as Float /** PV Transmitter Fail Lim Low **/
holdlastout as Boolean /** Hold Last Output on Transmitter Failure Enable
**/
xfailout as Float /** Output on Transmitter Failure **/
holdlastmode as Boolean /** Hold Last Mode on Transmitter Failure Enable **/
xfailMode as Float /** Mode on Transmitter Failure **/
pvroc as Float /** PV Rate-Of-Change Alarm **/
sphlim as Float /** Setpoint High Limit **/
spllim as Float /** Setpoint Low Limit **/
sptrackpvman as Boolean /** Setpoint tracks PV in Manual **/
resspen as Boolean /** Restart from last Setpoint enable **/
ressp as Float /** Restart Setpoint **/
startMode as Integer /** Start Mode on Download **/
ophlim as Float /** Output High Limit **/
opllim as Float /** Output Low Limit **/
arwhlim as Float /** Anti-Reset Windup High Limit **/
arwllim as Float /** Anti-Reset Windup Low Limit **/
oprampen as Boolean /** Output Ramp Enable **/
opramptime as Float /** Output Ramp Time **/
optrken as Boolean /** Output Track Enable **/
reslastop as Boolean /** Restart at last output **/
resop as Float /** Restart Output **/
failopen as Boolean /** Fail Open Valve **/
flsfopen as Boolean /** Fail-Safe Output Enable **/
flsfop as Float /** Fail-Safe Output **/
action as Boolean /** Direct or Reverse Action **/
gain as Float /** PID - Gain **/
reset as Float /** PID - Reset Rate **/
derivative as Float /** PID - Derivative **/
proponerr as Boolean /** Proportional Action On Error or PV **/
deronerr as Boolean /** Derivative Action On Error or PV **/
piddelta as Boolean /** PID is delta or absolute type **/
pidtype as Integer /** PID Algorithm series, parallel, modified parallel **/
execrate as Float /** PID - Execution Rate **/

/** Run-Time Inputs from MMI and Process **/
currpv as Float /** Current PV **/
currmode as Integer /** Current Mode **/
currsp as Float /** Current Setpoint **/
manout as Float /** Output Set by Operator in Manual Mode **/
remsp as Float /** Current Remote Setpoint in RSP or SUP Mode **/
ddcout as Float /** Current Output from remote program in DDC Mode **/

/** Outputs Set by PID Block **/
hhalarm as Boolean /** PV High-High Alarm set by block **/
halarm as Boolean /** PV High Alarm set by block **/
lalarm as Boolean /** PV Low Alarm set by block **/
llalarm as Boolean /** PV Low-Low Alarm set by block **/
devalarm as Boolean /** PV Deviation Alarm set by block **/
xfailalarm as Boolean /** Transmitter Failure Alarm set by block **/
splimited as Boolean /** Setpoint in Limit condition **/
calcout as Float /** Calculated Output from the PID Block **/

welcome aboard,

chetan

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
C

Campbell, David (Ex AS17)

> Jiri Baum wrote:
> Hello Rick Kephart,
>
> welcome!
>
>> I am most interested in helping with the control program execution
>> engine (I need to study the archives / specs / code to get up to speed
> > with exactly what you all are doing). I am also interested in helping
>> with the function block / algorithm development (PID, Boolean/Ladder
>> logic, Auto-Sequence algorithm etc.). I assume that these parts are being
>> worked on even when other parts are the "current topic".
>
> Yup - if memory serves, the latest addition to the CVS was a parser for
> Instruction List / Structured Text, and it's a work-in-progress...

I think a "coders at work" sign needs to be stuck on the /logic/iec directory. It could be a week or two before simpler ST routines can be translated to "C".
The IL will be dealt with at a later date (the Bison rules have been coded but are commented out until I can get simple ST functions working).

David Campbell


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
R

Rick Kephart

Hi Harald,

>Especially the last item you mentioned sounds quite interesting >to
>me. Could you please give me some insights on the real-time
>communication

Probably the best example that I can think of is in fossil Power-plant control applications. The control system for a power plant application can
be (roughly) segmented as boiler control and turbine control.

In many instances the boiler control system is supplied by the DCS manufacturer (e.g Westinghouse, Foxboro, Bailey, ...etc). The Turbine control system is many times supplied by another party (most often the the turbine manufacturer) which may not be the DCS manufacturer. Obviously the Boiler and Turbine control systems must cooperate in a coordinated manner.

To accomplish this the boiler control system needs access to point information from the turbine control system (for both reading and writing).

This point data is nowdays most often exchanged between the two control systems via TCP/IP (over a dedicated ethernet) interface that resides on the DCS. The real-time aspect is in two parts. The first of which is that in order to be synchronized with control execution we write the interface driver to appear as "virtual I/O" on the DCS.

AS a result, we have to enforce that point values are being updated at the desired period. In many cases the gateway computer on the "other" control
system is redundant. Thus the process that manages the socket must a) monitor the health of both connections and b) fail-over to the backup
connection if the primary connection fails. All this should happen with no loss of data and no operator alarms (except for an alarm indicating that the primary connection failed).

Hope this helps.



Thanks

Rick


> I have written both system level software, function
> block/algorithms (including PIDs) and real-time TCP/IP communication
> drivers.


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
R

Rick Kephart

Hi Chetan,

>If you would like to work on the PID module it would be a great >help.
Mario
>and I have put together the spec for the PID Block and I >recently
completed
>putting together the structure for the PID function call (as >shown below).
>Next task is to actually start coding. I'm hard pressed for >time currently
>due to some re-organization here at work and so on.

This would be great. I can start looking at it right away. Does the spec you refer to exist as a document on the web site or only in the list archives? (This will probably be obvious once I really start to look for it !!!).


Thanks

Rick


_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Top