Hello Guest it is April 28, 2024, 03:07:28 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - HimyKabibble

671
General Mach Discussion / Re: Smoothstepper and probing, home and THC
« on: September 05, 2010, 10:28:32 AM »
Not a "Real" USB device?  It's either a USB device or it isn't.  USB is USB.
There are all manner of interface converters on the market. Parallel to 'serial', USB to parallel, USB to IDE, etc. In my view, a 'legacy' printer with only a parallel port does not become a 'USB device' if a USB to parallel cable is used to connect it to a PC. I can see now that instead of 'real', perhaps 'native' might be a better word. That said, many of these 'converted' interfaces do not have all of the features of the native devices, for example in USB, the inability to run thru a hub.

[RSL] You're misinterpreting how the SS works.  The communications between the SS and the PC *IS* 100% standard bulk-mode USB.  The USB "host" hardware is built into the PC, and the USB "device" hardware is on the SS board itself.  The cable is a simple, off-the-shelf passive USB cable, with no chips, converters or active electronics of any kind.  The 15-foot cable I use with my SS came from Radio Shack.  The SS is absolutely every bit as much of a USB device as your iPod, or digital camera, scanner, or any other device.  The SS absolutely CAN run through a USB hub.  It's not recommended, as running through a hub is not desirable, because a hub adds latency to the communications, because the data has to be received by the hub, then re-transmitted from thub to the device, potentially doubling the "transport" time.

ANY USB interface can be made to present itself to the PC as any kind of device it wants.  It IS simply software, or actualyl firmware.  Each USB device, when connected to the PC, provides a "descriptor", which is a table of information that tells the USB "host" device in the PC what it is.  Whether the device chooses to tell the PC it's a "serial" port, "parallel" port, mass storage device (like a FLASH drive), camera, audio device, or whatever, is strictly a matter of what data is loaded into the descriptor, which is determined by the firmware controlling the USB hardware.  This does nothing more than tell the PC which driver to load so it knows how to "talk" to the device.  In the case of the FTDI converters you reference, the ONLY thing unique about those chips is they have the firmware built-in, to make them appear to the system as a specific device.  This is done purely so anyone can take that chip, wire it up, and be talking to a PC immediately, without having to write any firmware.  If you look at one of the many "Serial" cables made with FTDI chips, they typically have a "Wart" at the far end fo the cable, where the DB9 connector is.  The chip is in that wart.  The communications over the cable is pure, standatd, bulk-mode USB.  Each byte of data sent from the PC is received by the chip, which then puts it directly into a UART, whose TX pin is connected to the DB9 connector, so it can be sent to any standard RS232 device.  Data received from the RS232 device is sent to the UART, which converts it back to parallel data, which is put back on the USB cable, and sent to the PC.  This is no less of a USB device than an iPod.  You can plug the cable into a hub, rather than directly into the PC.

Quote
FTDI makes USB chips, and provides drivers, that emulate serial and parallel ports.  That emulation is *entirely* a software feature on the PC side, and has no effect whatsoever on timing. latency, or anything else.  It is purely in how the driver presents itself to the OS. 
The FTDI that I have seen require hardware as well as the driver. In most cases, the chip is in the device, as is the case with the SS. However, FTDI sells a series of cables that include the chip in the cable itself. Granite devices drives use this method, for example, and if one was not aware that the chip was in the cable, then it would appear that the drive was a 'native' USB device, but it is not. Emulation or conversion of any kind would introduce latency, it seems to me. There is no 'pin 15' in USB speak, for example, so this must be codec somewhere in the process, and that is going to take time in each direction . . which = latency.  It would be a question of how much and if that amount had any significance to a 'real time' process.

[RSL] The SS makes no attempt whatsoever to emulate a parallel port as its interface to Mach3.  Mach3 and the SS are continuously passing messages back and forth to each other so keep both sides informed as to what is going on.  Where the Mach3 PP driver busies itself with actually generating step and direction pulses, when the SS is used, Mach3 instead tells the SS something much more like "move this axis to this position at this speed, and tell me when you're done".  Of course, it's a lot more complex than that, but that is the general idea.  All actual motion control comes from the SS hardware and firmware, NOT Mach3.  The step pulses are actually generated entirely by dedicated hardware, which is why the SS is able to generate a far smoother, faster pulsetrain than Mach3 can through the PP.  The fact that the SS "maps" it's inputs and outputs to virtual parallel port pins is strictly a user convenience, and avoids the SS requiring more extensive changes within Mach3 than it already did.  But it is simple mapping, and nothing else.  If Mach3 needs to set the output called "Pin 15", it sends a message to the SS which says, effectively "Please set Pin 15 High".  Which physical connector on the SS it chooses to label "Pin 15" is completely arbitrary, and has no real meaning beyond providing a means for Mach3 and the SS to know which output is being manipulated.


Quote
This is done so software written to talk to a COM: port will see an FTDI device as a COM: port, even though it really isn't.
This is my point exactly, down to the use of the word 'really'. There is not one universal method of doing this. I have older converted USB devices that have drivers that attach to a specific physical USB port. If you want to use a different USB port, you have to reinstall. Others show up as a virtual LPT or COM port. The SS shows up as a device on the the USB bus.


 

672
General Mach Discussion / Re: Smoothstepper and probing, home and THC
« on: September 04, 2010, 06:47:48 PM »
Your original post made assumptions that were just not factual, such as the SmoothStepper not being a 'real' USB device.
From the FTDI site page one: Welcome to FTDI - specialists in converting legacy peripherals to Universal Serial Bus (USB).

There is no assumption for you to label as factual or not. Smoothstepper uses the FTDI interface. That is not good or bad, it IS simply fact. FTDI has a single purpose and if my saying that this is not 'real' USB offends your fanboi sensibility, then please feel free to choose whatever word you like, it is really not relevant to the discussion.The only point to be made is that any signal conversion is going to impose some latency and when speculating about the inability of the smoothstepper to perform certain function that require 'real time' response, the FTDI or ANY other device that would create latency is a logical suspect. I did not say it does or does not, I merely pointed out that this is the method smoothstepper uses, and obviously therefor the potential exists.

As to insulting your character, Jeff, that was not my intention at all. I was simply making an observation based on what I have read many times. This is a forum. Words vs words. It is what it is and not more than that. You are very helpfull on this forum as are many others and that is admirable, but that does not give you immunity from consequences if you choose to sarcastic remarks, even if you backpedal later. Put another way, if you start a fight, don't cry if you go home with a bloody nose.  :'(

Not a "Real" USB device?  It's either a USB device or it isn't.  USB is USB.  FTDI makes USB chips, and provides drivers, that emulate serial and parallel ports.  That emulation is *entirely* a software feature on the PC side, and has no effect whatsoever on timing. latency, or anything else.  It is purely in how the driver presents itself to the OS.  This is done so software written to talk to a COM: port will see an FTDI device as a COM: port, even though it really isn't.  Regardless of what interface is being emulated, or whether it's some completely new device type, the data going over the USB interface always looks the same, and it's sent and received using the exact same protocol, timing, etc. as every other USB device.  Were it not so, no two USB devices would ever be able to communicate.  USB is nothing but a high-speed (1Mbps, 12Mbps, or 480Mbps, depending on the hardware used, and operating mode) self-clocking serial interface, not unlike IEEE-1394 (Firewire), Ethernet, and many others.  Any significant latency is primarily a function of Windows itself, as I/O requests from applications, like Mach3, get buffered up inside Windows, and only passed down to the device driver periodically.  With Windows, there can be as much as 10mSec of latency from the time an application makes an I/O request, until the driver is actually called.  Once the driver is called, unless there is already so much data buffered up that all the USB bandwidth is already being used, the data will generally make it from the PC to the device at other end of the USB cable in no more than one USB frame (1mSec) or so.  The SS is a "Full Speed" USB device, so all data transfers are 12Mbps.

This all has little or nothing to do with why THC doesn't work, or probing.  When probing, the Mach3 parallel port driver issues a step pulse, then immediately checks the PROBE input to see if it's gone active.  If so, then it knows the probe is complete.  With the SS, Mach3 tells the SS to probe.  The SS issues the step pulses, and tests the PROBE input.  When the PROBE input goes active, the SS stops stepping, and sends the position back to Mach3.  And, except for the communications with Mach3, this is all handled in hardware, not software.  I would assume THC, like probing, requires a short latency between the THC input signal and the Mach3 driver.  But, because of the ~1mSec nominal latency of the USB bus, and the OS delays getting from the USB driver to Mach3, there is too much latency for the THC to work correctly.  This could be fixed by handling THC in much the same way as probing - "closing the loop" within the SS itself, but that is not how it currently works.

Regards,
Ray L.

673
General Mach Discussion / Re: Mach3 and OrCad
« on: August 03, 2010, 10:11:13 PM »
A DXF file is NOT G-code.  It is a drawing file that can be processed by CAM software to CREATE G-code.

Regards,
Ray L.

674
General Mach Discussion / Re: Reading IO issues
« on: June 10, 2010, 12:11:54 AM »
If you're going to do that, you have to use a semaphore to keep the first macro from exiting before the second one has completed.  Mach provides no synchronization between macros at all.

For example:

M1000.m1s:

Code "M01 ("This is M1000")

M2000.m1s:

Code "M1000"
Code "M01 ("This is M2000")

If you execute M2000, it will queue up the M1000 macro, then proceed executing.  So what you'll see is:

"This is M2000"
"This is M1000"

Which is exactly opposite what you want and expect.

Here's what you need to do:

M1000.m1s:

SemaphoreVar = 1000  ' This can be any unused Var number - Must be same one as in M2000.m1s
Code "M01 ("This is M1000")
SetVar (SemaphoreVar, 0)

M2000.m1s:

Code "M1000"
SemaphoreVar = 1000  ' This can be any unused Var number - Must be same one as in M1000.m1s
SemaphoreVal = 1
SetVar (SemaphoreVar, SemaphoreVal)
Code "M01 ("This is M1000")
While SemaphoreVal > 0
    SemaphoreVal = GetVar(SemaphoreVar)
    Sleep 10
Wend
Code "M01 ("This is M2000")

The semaphore ensures that the M1000 macro completes execution *before* the M2000 macro progresses beyond the While/Wend loop.  You can actually nest macros several deep if you initialize the semaphore to zero in the top-most macro, then have the calling macro increment the semaphore value, and make the While condition wait for it to be decremented back to its original value, and have the called macro decrement the semaphore, instead of simply clearing it.  This is the only way I know of to make nested macros behave in a predictable manner.  Without this, you have no way of knowing the exact order in which they'll execute, so it will behave differently at different times.  This is another of the MANY things that will be fixed in v4.

Regards,
Ray L.

675
General Mach Discussion / Re: Polygon Turning
« on: June 07, 2010, 10:16:06 PM »
Can Polygon Turning be done using mach 3?  i.e. running two spindles at the same time accurately.  Im currently designing a benchtop machining centre and would love it to be able to do this :)  it already has live tooling for small tools (5/16" dia max), a 16c large bore spindle with auto collet closer and is about 40cm x 800cm c 40cm in size.   
My headstock spindle is servo driven with a mitsubishi 400w melservo (still wondering if this is big enough) and I am wondering if i could design the tool rack to hold a flywheeled servo driven tool maybe with a 200w servo and a hefty flywheel to dampen the cutting action.  Any ideas????

Its pretty awesome stuff...

ref videos:

http://www.youtube.com/watch?v=-9jMN9Bgg6g
http://www.youtube.com/watch?v=KMdBIBzGtKI
http://www.youtube.com/watch?v=yDNogxSWa-w

Rob :)

You can actually do that pretty easily in hardware, by linking the two spindle drives with a digital phase-locked loop, then let Mach3 program the multiply/divide ratios to give the factor you need for the polygon.  There are digital PLL chips that will do this nicely.  Here's a pretty good introduction to the DPLL concept.

Regards,
Ray L.

676
General Mach Discussion / Re: Feed Hold and Stop
« on: June 07, 2010, 10:07:28 PM »
A point worth noting; using feedhold stops the program at the end of the line it's on within the main program. So if that line is M98 P5 L100, and p5 takes 5 minutes, you will have a long wait for it to actually stop.

No, that is not true.  FeedHold stops as quickly as it conveniently can.  It does not wait until the end of the current move.  Sometimes it will stop quickly sometimes it may take a few seconds, but it absolutely WILL stop before reaching the end of any particular move.  Try entering a long, slow move on the MDI line, or in a file, and execute it, then press FeedHold.  You'll see it does indeed stop mid-move.

Regards,
Ray L.

677
General Mach Discussion / Re: Feed Hold and Stop
« on: June 07, 2010, 09:47:00 AM »
Ray, Amir,
I think this discussion may help sort out the confusion about Stop and Feed Hold. When Stop is used, it stops all the outputs like Spindle, coolant and pulse as soon as possible. But Mach is able to keep track of issued pulses to the axis. Servos are normally behind the pulse train being issued by Mach and is following it by the counts what we call "Following Error." So, when pulse train is suddenly stops, the servo which is slightly behind the actual issued pulses, will be able to take care of sudden stop. If the inertia is heavy and speed is high at the time of Stop, servo may overshoot a little and then will return back at the last commanded pulse count. Hence Stop should not result in lost steps if servos are used and not induced to the Fault mode. Definitely, stop being sudden, it exerts  heavy thud  on the machine components. Comments are invited.
Mahesh Vyas.

No, you're not understanding what I said - Every servo tracks a value, called following error, which is the difference between where its encoder says it is is, and where it is actually supposed to be.  Every servo controller also has a limit to how larage a following error it will allow.  If this limit is ever exceeeded, the servo controller will fauilt.  For Geckos, the maximum following error allowed is only 128 steps, which typically maps to only a few thousandths of an inch of axis motion.  If the axis position is ever more than 128 steps from where it's supposed to be at any given time, the Gecko will reset itself, which will cause its position to no longer match where Mach3 thinks it is.

And when Mach3 does a Stop, it does not stop "as soon as possible".  It simply stops issuing step pulese RIGHT NOW.  There is NO deceleration whatsoever.  It ceases to output step pulses the instant it recognizes that a Stop has been requested.

Regards,
Ray L.

678
General Mach Discussion / Re: Feed Hold and Stop
« on: June 06, 2010, 09:52:39 AM »
Garry, and Man,
Thanks for the insight. I agree, it is a stop without deceleration. But I feel thMach will know how many pulses it has applied to the axis and servo having received that much must be in sync with Mach even though stop is issued. It is possible to lose steps for Stppper Motors as there is a sudden stop and having no feed back, it has no reason to know that the the motor has over travelled due to inertia. But servo will take care of the sudden stop, and will not loose sync with Mach. Please correct me if wrong. Stop is required, when the deceleration travel undertaken by Mach and obeyed by servo may damange some thing on machine to warrant Stop action.
Mahesh Vyas.

Your assumption is correct only if the axis is moving slowly enough that the machine does not "coast", due to inertia, far enough to cause the servo to exceed its allowable following error and fault.  If you're using Geckos, the maximum following error is only 128 counts.  On my machine, that's only 0.0064", which is not much when the 400# table is moving at 300 IPM.

Regards,
Ray L.

679
General Mach Discussion / Re: Probe Installation Problems!!!!!!!!!
« on: May 26, 2010, 09:49:50 AM »
The probe works fine, but you probably need a stiff pullup resistor on the PP input.

Regards,
Ray L.

680
General Mach Discussion / Re: Three LPT Ports
« on: May 20, 2010, 12:08:30 AM »
No.  Mach3 supports only two PPs.