On Thursday 28 July 2016 12:12:07 Nicklas Karlsson wrote:

> > It might be worth reconsidering how unconnected pins are handled.
> > Letting something read or write to dummy can cause nasty bugs.
> > That's particularly true for writing to dummy.
>
> Reading a unconnected pin should result at least in a warning. I guess
> this could be checked beforehand as soon as linuxcnc is started.

And, since unconnected pins, at least to the external world, read as a 
logic 1, how do we discern between the unconnected pin, and the g38.2 
probe that has not yet contacted a grounded object?

hal OTOH maintains an internal connection table, and I would think it 
would fairly easy to scan the hal files, and detect a "net name source" 
statement that was never subjected to adding a target load.

That still leaves the scenario where one has defined a list of target 
loads, intending to feed that list from a previously defined "net name 
source", but the names do not match. It can only spot that sort of error 
if the list of target loads is known as write only.  That is not always 
carved in stone when dealing with real hardware.  Lets just say that it 
has caught ne out a few times, with "interesting results".

Example: With digression

I have had several occasions where, after an extended uptime, I went to 
run a routine to determine the mounted tools tlo, and drove the tool 
thru the gauge contact and into the jig or table, crushing the tool.

The second time it happened I put a meter on the probe line and watched 
the contact take place as I jogged it down very slowly. But It was not 
being reported on the halmeter.  So I shut down and swapped the 5i25 
card, which worked for about a month, then did it again. I verified that 
the contact was not visible to the halmeter, and simply rebooted.  That 
fixed it and it has fixed it 4 or 5 times since.  That says its a hal 
problem.

I have checked the integrity of the external probe line from the BOB to 
the end of the wire quite a few times and it "rings" good at a small 
fraction of an ohm every time. I swapped the db25 cable to the BOB once 
for a freshly made new one.

The toy mill, the only machine still doing SW stepping, has never missed 
a contact.  I will at some point as it starts to cool down, redo the toy 
mill with a higher voltage motor supply, and the 5i25 I took out of the 
bigger mill when I swapped 5i25's in it due to the missed probe contact 
problem. So that will test that 5i25 as it will be setup with 4 
stepgens.  It has a shared pair of limits, but no home switches, or 
spindle encoder, so hopefully I won't have to add another cable and BOB 
to P2.

It does have an A axis as I have a small rotary table I put a motor on 
several years ago.  I use it for tool sharpening, or for milling wrench 
flats, but for tool sharpening it really needs one of those double 
tables so clearance angles can be done directly instead of propping up 
the table at an I think thats about right angle. :(

Humm, I digress, as usual.

> > Checking for a null pointer is pretty fast with today's machines --
> > even with the ARM and other little processors.
>
> Yes checking is fast but the best is to allow only valid assignment
> because it make software simpler and avoid the problem did not
> remember to check everywhere. Only a few languages however have good
> type checking.
>
> > I wrote a similar system back in the early 70's (the processor was
> > an Intel 8080). The model didn't differentiate between signals and
> > parameters. Everything was implemented as a (logical) value in a
> > named register. The last writer of the value won. There were four
> > thread priorities that ran asynchronously. That could lead to some
> > "interesting" bugs.
>
> That's why global variables or other form av similar global storage
> should not be used.
>
>
> Nicklas Karlsson
>
> ----------------------------------------------------------------------
>-------- _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to