Hello Guest it is April 24, 2024, 02:51:08 PM

Author Topic: Smoothstepper and probing, home and THC  (Read 19351 times)

0 Members and 1 Guest are viewing this topic.

Re: Smoothstepper and probing, home and THC
« Reply #20 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.
Regards,
Ray L.

Offline Jeff_Birt

*
  •  1,107 1,107
    • View Profile
    • Soigeneris
Re: Smoothstepper and probing, home and THC
« Reply #21 on: September 04, 2010, 07:19:03 PM »
Some folks have no interest in civlized conversations or facts they just want to bash others, how sad...
Happy machining , Jeff Birt
 

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Smoothstepper and probing, home and THC
« Reply #22 on: September 05, 2010, 03:53:28 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.
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.
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.


 

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Smoothstepper and probing, home and THC
« Reply #23 on: September 05, 2010, 04:31:52 AM »
. . . .  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.
Fortunately, I'm sure the fix will come with Mach4 or Smoothstepper II . . . in 'the next few weeks' . . 

I am not content to sit back and just toss another complaint on a very tall pile. What made this topic interesting was to discuss the possibility of performing the missing Mach functions outside of the SS as I did with swapaxis. As I mentioned at the onset, I don't know much about THC, but on the surface, it does not seem terribly complex. More so than swapaxis, perhaps, but certainly not more than a dynamic balancer. It just needs a team of people with expertise in different areas willing to donate the time to come together and come up with something doable, starting with a clear explanation of exactly what is required for THC. I have a smoothstepper now and was willing to contribute, but staying on topic has proved impossible whenever Smoothstepper is part of the discussion and it quickly becomes uninteresting. I have no need for THC or backlash compensation, so I will not persue it further. 

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Smoothstepper and probing, home and THC
« Reply #24 on: September 05, 2010, 05:35:56 AM »
Gentlemen - I think we're getting closer - but as always - the devil is in the detail. Can I push a little deeper.

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.

Well not quite complete - we're not done yet. What then "goes on" between the PP and "Mach3"? i.e. the probe trips. Then...? (see the next bit for what I'm getting at)

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
Well not quite - it DECELERATES to a stop. How does it (the SS) know how to do a deceleration curve?

and sends the position back to Mach3.
Ah - one of my earlier questions - How?

Cheers - and let's keep it cool guys - I'm grateful for ALL your input.

Ian
Re: Smoothstepper and probing, home and THC
« Reply #25 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.


 
Regards,
Ray L.
Re: Smoothstepper and probing, home and THC
« Reply #26 on: September 05, 2010, 10:37:03 AM »
Gentlemen - I think we're getting closer - but as always - the devil is in the detail. Can I push a little deeper.

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.

Well not quite complete - we're not done yet. What then "goes on" between the PP and "Mach3"? i.e. the probe trips. Then...? (see the next bit for what I'm getting at)

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
Well not quite - it DECELERATES to a stop. How does it (the SS) know how to do a deceleration curve?

and sends the position back to Mach3.
Ah - one of my earlier questions - How?

Cheers - and let's keep it cool guys - I'm grateful for ALL your input.

Ian

The SS *knows* what the accleration and velocity settings are for all axes.  So, when it needs to do an acceleration, or deceleration, it knows how to do it.  Mach3, through the SS plug-in, does not tell the SS "issue a step pulse on this axis", it tells it "move this axis to this position", and the SS hardware handles all the details of the move.  And the step pulses, including accleration and deceleration ramps, are generated entirely by hardware.  The firmware on the SS simply programs the hardware so it knows what to do.  Once motion starts, the hardware is doing everything autonamously.

Communications between Mach3 and the SS is by messages, not parallel port pin signals.  Each message consists of a sequence of bytes, some short, some long, using a protocol defined specifically for SS.  Those messages tell the SS to do things like "jog this axis at this speed", "move this axis to this position", "set this output to this state", "read this input", "home this axis", etc.  Of course, the actual communications is far more complex than that, but that is the general idea.  Messages are flowing pretty much continuously, with the PC telling the SS what to do, and the SS returning status to Mach3, so it knows what it needs to know about what is going on.  But, with the SS, the PC is doing FAR less work than it does using the PP, because all the "heavy lifting" is done by the SS itself.  The PC is left to run the UI, and do the trajectory planning, but no longer needs to concern itself with the details of the trajectory execution.

Regards,
Ray L.
Regards,
Ray L.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Smoothstepper and probing, home and THC
« Reply #27 on: September 05, 2010, 11:47:13 AM »
All making sense and understood but get a grip with the old quoting mechanism Ray - I've just about done my already poor eyesight right in  ;D

I'll go away and have a bit more thinks but at the moment I'm thinking so why no THC - it (now)sounds to me relatively trivial - THC to SS: "UP", SS to Z: "pulse", and then the occasional SS to Mach: Update the Z dro/pos to: "3.142".
Job done and we all go down the pub.

Cheers

Ian
Re: Smoothstepper and probing, home and THC
« Reply #28 on: September 05, 2010, 11:51:48 AM »
i think only delay time
**Even a clock that does not work is right twice a day**
Re: Smoothstepper and probing, home and THC
« Reply #29 on: September 05, 2010, 02:20:21 PM »
All making sense and understood but get a grip with the old quoting mechanism Ray - I've just about done my already poor eyesight right in  ;D

I'll go away and have a bit more thinks but at the moment I'm thinking so why no THC - it (now)sounds to me relatively trivial - THC to SS: "UP", SS to Z: "pulse", and then the occasional SS to Mach: Update the Z dro/pos to: "3.142".
Job done and we all go down the pub.

Cheers

Ian

Ian,

I suspect there's no reason the SS *can't* do THC, it simply doesn't (yet), same as with backlash comp.  The hardware is entirely capable, but the firmware and plug-in code has yet to be writtento support it.  SS development largely stopped about a year ago, as Greg has had other, higher-priority, more profitable work to get done (a higher-end motion controller aimed at commercial and industrial machines).  The sadfact is, the hobby CNC market is quite small, and tough to make money in.  So, for now, the SS is very good at some things, not so good at others.  For those that don't need backlash comp, THC, and the few other features it doesn't yet support, it's a great product.  It dramatically improved the performance of my mill, so it serves a very useful purpose for me.  But, it's not yet the "Swiss Army Knife" of motion controllers.  That may, or may not, change in the future.

Regards,
Ray L.
Regards,
Ray L.