On Sun, 26 Aug 2012 08:08:49 +0000, Chris Morley wrote: >>From time to time I was thinking on Stuart's talk about >> error/debugging messages. > While working on Gscreen I added a message system. > > It uses HAL pins to trigger a dialog/ desktop notification/ sound. > I think this would work fine for user created components and ladder > programs. > It would be a lot of INI/HAL code to set up many error cases. > > What it doesn't work well with is default components because most > (all?) don't a have > error protocol in place (might just have an error bit pin) > > For instance VDF components have no way to tell the operator that > there is a specific > problem, even if the VDF it's self could tell you. > > So here is an imagined system : > A component that monitors all error messages HAL based. > This component would be separate from the GUI screen. > > On the HAL side this component could monitor the HAL components that > have > registered an error bit pin and a error S32 pin. > So now the component knows the HAL component name, has an error flag, > and an error number for look up. > using the HAL components name it looks up a text file for the > messages. > > VDF.message > 1 critical "loss of main power" > 2 info "speed increase not possible - VDF at maximum speed" > etc > > so critical errors throw an estop, info does nothing. > > Obviously not all HAL components need an error system so they would > not > export error pins and the message component would ignore them. > As a component builder one would be expected to add the pins and > logic to > control them in the component and make a message look up file. > If the message component was smart enough you wouldn't need to > connect > these error pins - it could search for them, though this might have > limitations. > > if it notices an error it looks up the message and then either > display the message > it's self or sends it as an NML message so the gui screen can deal > with it. > > Thoughts?
Chris, Reading this I got to thinking how nice it would be if there was a library of common functionality so that the mass of HAL code could be abstracted and then "included" with a source/include call. It has been awhile since I had to do any serious HAL/LADDER coding, but I do not remember an if/then/else. If that is available, or added, then we can add "if LCNC_MESSAGING..." in base components. just a thought... EBo -- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
