Hello Guest it is March 19, 2024, 04:48:49 AM

Author Topic: Mach4 Printer Port Discussions  (Read 1243707 times)

0 Members and 1 Guest are viewing this topic.

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #390 on: August 19, 2014, 11:57:11 AM »
Hi Art:

This will be a very short report 16-3
The history shows nothing - nada - zip. Immediately after startup and even after I enable/disable a couple of times even though the charge pump and K2 relay on Port 1  pin 14 changes state. Nothing in History.
I thought at first history was broken but I pressed a home switch and it showed in in the history bar.
In an earlier version you said you made it so more stuff would show up in history and lots of things showed up after that.
The version numbers are showing up on my Darwin config  as 1.11 and 1.08 is that correct??
I replaced both the dll and the plugin by mistake.
Maybe I screwed something up copying the files?

I didn't understand Peters port address as dcc8. But does that have any addressing bits in common with 0378. Maybe you're not addressing to the full number of bits required to distinguish between the two. Just a thought.

Sage

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #391 on: August 19, 2014, 12:01:11 PM »
Peter:

   I allow 4 ports. Each is filled with a simple loop and each has its own data registers.. kinda like..

for( int x = 0; x < 4; x++ ) Port
  • .Data = FillFromPort(x);


   so each port is separate entirely, and its data is separate. So if one screws up, the theory goes all ports should
screw up. Now Im willing to believe the resource address can be wrong, and that WOULD explain a great deal, but it would beg
the question as to how Mach3 works with that address. THATS whats confusing me..

Art

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #392 on: August 19, 2014, 12:07:14 PM »
Peter / Art:

It's probably a marginal test to jumper pins with the cable open because of floating pins. Lots of funny things can happen. From experience this can drive you crazy. It would be a lot of work but terminating the cable with a bunch of pull-ups would be more reliable.
 Art: As you mentioned the hardware on the parallel port inverts some of the input signals to suit a parallel printer "normal" needed to be inverted (to low). Presumably so that if the cable was unplugged the interface could tell if the printer was present or not. (no printer - pin floats high - printer not there to pull it low)

Sage

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #393 on: August 19, 2014, 12:08:24 PM »
Sage:

  The empty buffer mean M4 isnt calling Darwin to trigger a change in its IO.. Thats good. It means all is normal there..

Im thinking... In Mach3, the port gets initialized and all pins are set to low, even if unused. Darwin isnt doing that,
if a pin is not specifically listed as used, it is left alone. So..when after loading the port is reset, the pins go to whatever default state they
wish to be at. It may be that is toggling things when the charge pump comes on. The charge pump starts when the program does and the port
gets reset at the same time. So Im wondering if this is simply a case of the pin is getting toggled to a low as a static reset state and triggering
the relay. Darwin doesnt care or touch any pin reported as unused, so it will be high or low depending on the type of printer port and its designers
reset state. Normally I think this is the pin getting pulled high.. So if you then enable a signal on that pin and dont use it, the pin will get pulled
to whatever inactive state is called for ( depends on the "negate" setting ). Could this be what your seeing?

Art

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #394 on: August 19, 2014, 12:09:20 PM »
Sage:

 No, almost all printer ports have pullup resistors... though Ive seen them with pulldown ones. But Ive never seen one that actually floats..

Art

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #395 on: August 19, 2014, 12:11:46 PM »
Sorry, I take that back.. internally the driver starts with a zero integer, then fills it one by one with active signals, so
any pin not refered to will be set to a zero .. which should be a low on the output.. but of course that could be triggering your relay
since most ports default to a high on the data pins..

Art
Re: Mach4 Printer Port Discussions
« Reply #396 on: August 19, 2014, 12:14:41 PM »
Art,

If the resource address were set to the wrong value, wouldn't that make all the pins wrong/inoperative?

Peter

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #397 on: August 19, 2014, 12:15:33 PM »
Peter / Art:
Would it make any sense to create a setup that only deals with one port at a time. Rather than both ports. It might make it easier to see which port  is issuing which signals. It appears you have BOTH ports issuing possibly different rogue signals to each other confusing the issue.

Sage
Re: Mach4 Printer Port Discussions
« Reply #398 on: August 19, 2014, 12:17:16 PM »
Sage,

Other than the K2 problem, port 1 appears fine.

Peter

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #399 on: August 19, 2014, 12:32:19 PM »
Art:

>>Normally I think this is the pin getting pulled high.. So if you then enable a signal on that pin and dont use it, the pin will get pulled to whatever inactive state is called for ( depends on the "negate" setting ). Could this be what your seeing?

To be clear a high is what activates my relay. But I get your point and that's probably what's going on.

 I'm going to have to experiment to see what makes it stop toggling. But regardless of what I select, if the port pin is being changed then the relay is going to toggle. I can't see where enabling the pin and inverting it will make any diference other than have the relay activate opposite to what it is now.
 But this is not really a good solution as one does not really want to have to program every port pin used or not and you don't really want unused (un-enabled) ports turning on and off on their own.
Perhaps the "pull them all low" on startup and keep them that way unless they are used would be a good thing to do.

Sage