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

0 Members and 1 Guest are viewing this topic.

Offline pbarratt

  • Active Member
  • Posts: 125
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #360 on: August 18, 2014, 02:57:10 PM »
Art,

Nope, unfortunate typo.  Port 1 was set to 378, port 2 to dcc8.  Last night I tried switching them to each other and redoing all of the signal definitions to match.  That's when I reported no difference except for the encoder #0 DRO operation.  This morning I put things back to the way they were.  Encoder #0 DRO working okay (go figure).  Everything else the same as it was.

Sorry for the confusion.  A really bad time for that typo.

The cleared check box for (now) port 2 inputs happened again.

Peter

Offline ART

  • Administrator
  • *
  • Posts: 1,691
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #361 on: August 18, 2014, 03:31:11 PM »
Peter:

  Thx , Ill check that checkbox....

Art

Offline ART

  • Administrator
  • *
  • Posts: 1,691
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #362 on: August 18, 2014, 03:57:28 PM »
Peter:

   I think the checkbox was it. The system wasnt reconfiguring after selecting that, and the system requires a bit to be changed in the
control word of the port..

  This version should fix it.. with any luck. :)

Art

Offline patton

  • Active Member
  • Posts: 92
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #363 on: August 18, 2014, 04:22:36 PM »
I have pin 14 on both of my BOB that shows 5v when the display in Darwin is red and when I toggle it to green it gos to 0v... is that backwards or am I confused? the negate check box is unchecked

Offline Sage

  • Active Member
  • Posts: 365
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #364 on: August 18, 2014, 05:12:45 PM »
As far as Darwin is concerned Low (0v) is active. High (5v) is inactive.
But Mach4 is the reverse logic. And that IS confusing. Had me going for a couple of days trying to find a solution of reverse logic that worked for my home switches.

Even more confusing when the LED on my BOB comes on with a high (5v) from the port.
So Port high = BOB led on = Darwin ledicon off = Mach4 Ledicon ON.
Odd man out Art :-)

Sage

Offline Sage

  • Active Member
  • Posts: 365
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #365 on: August 18, 2014, 05:39:36 PM »
Art:

Attached is my machine.ini file. I had to rename it to .txt to get it to upload.
You can read my previous description of the issue and see what I'm missing.
At first I might assume some sort of hardware short of pin14 to something else but as mentioned pin14 does not mis-behave with Mach3.

Thanks Mr. Guru

Sage

Offline patton

  • Active Member
  • Posts: 92
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #366 on: August 18, 2014, 05:51:02 PM »
Ok originally in mach3 I had pins 9 and 14 as spindle forward and reverse and could not make that work for mach4 and Darwin now I moved it to pins 8 and 9 and it works great. and then pin 1 is the 0-10v analog signal for the vfd which also works great... I just need to get everything set so the speed will be right.

Offline ART

  • Administrator
  • *
  • Posts: 1,691
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #367 on: August 18, 2014, 07:27:04 PM »
Hmm.

  I suspect a lot of this is because Im used to dealing with raw data. Some pins on the printer port are inverted by the hardware.
When a program sets pin 11 to active = 1, the pin on the actual cable goes low. Several pins are auto-negated that way. Mach3
the program reversed that as I recall, but to a driver data ia data, so it never reversed it.
   My feeling at the time was that one just checks "Negate signal" to make it whatever polarity you wish when its active. Now M4
having a setting for low active does confuse that issue I must admit. :).

  Pin 1, 11, 14 and 17 read reverse to logic, that is when set active a 1 is sent to the hardware, which inverts it and sets the pin
low. Checking Negate on each of these pins should make them work as youd expect.. To Darwins design,  the only important
toggle was if the pin was active..or inactive. The "negate" checkbox was to make the Active state give the appropriate output.

   It sounds however, as if I may have screwed up in the plugin by not taking M4's ActiveLow setting into account. Ill take a
look and rationlise the two systems.. In the meantime, check or uncheck "Negate" on your signals on those pins ( or any pin)
to get the level you need for an active signal.

Art

Offline pbarratt

  • Active Member
  • Posts: 125
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #368 on: August 18, 2014, 07:32:14 PM »
Art,

Eagerly installed 1.160.  It shows as 1.160 in the plug in list.  When open, the upper right hand corner numbers are: 1.11 and 1.08.

Of course, the duplicated pin problem still remains as before.  However, now there's a new twist.  When I go to port 2 (set back to dcc8), it shows as input (pins 2-9) but pins 2-7, the encoder inputs, do not change with moving the axes.  To get them to work again, I have to deselect the input box then reselect it.  Then the encoders work as before.

Maybe not quite a step back, just a little sideways?   ;D

Peter

Offline ART

  • Administrator
  • *
  • Posts: 1,691
  • Tough as soggy paper.
    • View Profile
Re: Mach4 Printer Port Discussions
« Reply #369 on: August 18, 2014, 07:47:23 PM »
Peter:

  My apologies,,.. Im losing it. I added structures and routines to fix the problem, and missed a switch to actually turn it on
in the release. This one is repaired.

Note:  As to the previous discussion on signal levels. Use the Negate in Darwin to select the appropriate level for a signal, but NEVER
use the low active setting in M4, always leave that turned off. The reason is that M4 tells Darwin to set a signal to 1 or 0, but it doesnt
tell me if thats "active" or "inactive", so it can confuse Darwin, specially on things liek PWM. So as a rule.. never check "Low Active" on
any M4 signal. Only use "Negate" in Darwin to reverse a signal and things should look much more normal to you..

  From this version replace both your dll and your plugin. No version numbers change on this one..

Art