Hello Guest it is April 26, 2024, 01:26:52 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 - Jeff_Birt

961
VB and the development of wizards / Simple pause for testing macros
« on: September 10, 2008, 02:26:30 PM »
I needed to create a pause in a macro to test that a plug was receiving a flag that indicated spindle mode. Basically at the start of the tool change macro M6Start, a flag is lowered to signal that the spindle drive should switch to tool change mode. After all the tool change stuff takes place the flag is raised to signal run mode. I just needed a way to add a delay between the flag states to test that the plug-in was handling the flags properly. I searched for a pause command but did not find anything so I whipped up the following and thought it might be helpful to others. Please note having a pause in a macro like this, while useful for testing, is a bad idea in production code.

  DeActivateSignal(17)
 
  tool = GetSelectedTool()
  SetCurrentTool( tool )

  Dim TS As Single ' Start time
  Dim ET As Single ' Elapsed time
  Dim waiting As Boolean ' loop flag
 
  TS = Timer ' current time in seconds
  waiting = true ' we start out waiting
 
  While waiting
    ET = Timer
    If ET > TS + 30 Then ' the "30" is the # seconds delay
       waiting  = false
    End If
  Wend
 
  ActivateSignal(17)

962
Now, where are you going to find the little tiny operators for all your equipment?  :P

963
I've found that VPSE program linked above works great. You can even redirect the com port to TCP which is great as it allows me to remote into the controller PC and redirect the serial traffic back to my desktop PC so I can take advantage of my dual monitors, having Mach/VS on the remote display and the serial data in teh other.

I was testing with Hyperterminal before starting on my own serial tester and then found this: http://realterm.sourceforge.net/index.html#downloads_Download, this seems to be super handy for serial debugging and seems to be extensible.

964
General Mach Discussion / Re: closing the loop in mach?
« on: August 21, 2008, 01:23:52 PM »
Short answer, can't be done in Mach, need external hardware. Longer answer: This same question has been asked/answered about 142,000 times. A few minutes of searching (Search is towards the top of every screen) would have led you to several posts on the subject.

If your loosing steps it's because you have a tuning/mechanical issue. A closed loop system can still not prevent (all) step loss, most will just warn you that the error has exceeded some threshold.

965
General Mach Discussion / Re: Difference between STEP and DIR
« on: August 19, 2008, 05:06:13 PM »
Try a GOOD quality parallel cable, it needs to have one actual ground (common) wire per I/O pin. Trying to send a bunch of digital signals down a length of tightly (physically) coupled wires is tricky. The pulses will will be slewed at the receiving end. A high-quality calble as short as possible is a must.

966
SmoothStepper USB / Re: Got Smoothstepper 1.2
« on: August 19, 2008, 04:57:24 PM »
OK, me and my big mouth  :(, I have to humbly eat crow on this subject...


I was suspicious that the USB hibernation was causing an issue at all. I thought everyone was talking about the ‘Allow this device to bring the computer out of standby’ check box. I did a bit of searching on the subject and found the following:

http://www.usbman.com/WinME%20USB%20Guide.htm (1/2 way down page)
http://www.guidenet.net/resources/usb.html (this one has the best explanation)

967
I've been working on an plug-in to talk over a Com port to an older Vector drive. I wanted to do some testing before actually powering up the drive and went looking for a free virtual com port driver. I found this: http://www.eterlogic.com/Products.VSPE.html, which looks to be as good as the commercial versions (of which I have used trial in the past).

A virtual Com port driver set up pairs of connect Virtual Com ports on your PC so you can interconnect two programs that are meant to talk over a serial connection. The driver linked above also has some capabilities to redirect a virtual com to TCP. I plan on using it to create a virtual device to test my plug-in with.

968
SmoothStepper USB / Re: Got Smoothstepper 1.2
« on: August 18, 2008, 09:24:32 AM »
Hood, I don't think either one of them really had that problem 8). One of them reported on the SmoothStepper forum that changing the USB cable fixed his problem. Most folks don't follow any type of systematic method to troubleshoot a problem. They start clicking buttons and turning knobs and hope something changes. The last thing they remember touching then become the culprit. I'm as guilty of this as any, remember that I had issues with my SS that stemmed from me writing GCode by hand for the first time in years? I too was quick to jump on the last thing that changed in the system.

My point is that USB port don't just get shut off when the PC is in operation, that is NOT in the USB spec, nor would it make any sense. That being said I have seen strange issues with some motherboard's built in USB ports (all seemed to be USB 1.1 as well), they never lost power but they would not always appear as available to the system. I fixed it with a USB 2.0 PCI card.

969
SmoothStepper USB / Re: Got Smoothstepper 1.2
« on: August 16, 2008, 09:59:51 AM »
A USB port will not go into hibernation (power off) unless your whole PC does. The HW setting for the built in hubs just allows you to keep stay powered while the machine is hibernating, for instance so you can keep your mouse powered to use it to wake your machine from hibernation. If you have power management turned off then you have no worried.

970
I talked to Brian a bit about this and found out the problem. You can only access the profile in myConfig, or perhaps the myClose (not sure that is the right name) as Mach is using it the rest of the time. I decided to launch a separate modeless dialog when I want a diagnostic type dialog.