Hello Guest it is April 18, 2024, 10:33:42 PM

Author Topic: Tool changer routine with hot swap  (Read 34563 times)

0 Members and 1 Guest are viewing this topic.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Tool changer routine with hot swap
« Reply #40 on: March 26, 2008, 10:28:57 AM »
NOW if I can make it look the OLD way and do it the new way ???????

No problem - you revert to a previously mentioned scheme. You use your screen to load a table or whatever and your code operates on the table rather than on your DROs. In fact this is probably what you should do anyway - its good software engineering practice to keep a separation between the code and the interface.

Ian

vmax549

*
Re: Tool changer routine with hot swap
« Reply #41 on: March 26, 2008, 10:56:44 AM »
HI IAN, Same subject but a different project(;-)

 We have a denford mill with a tool changer that is converted to MACH control. Now we have to interface the ATC (toolchanger) to mach. THe atc runs from a serial connection. We have captured all the control codes needed to run the ATC and can make the TC cycle by sending the codes through Hyperterm to the atc.

Question? How do we get VB to send the controls codes over the com port when needed?

Question Can I send a copy of the tool table to a printer port? Say LPT1

(;-) TP
« Last Edit: March 26, 2008, 10:58:58 AM by vmax549 »

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Tool changer routine with hot swap
« Reply #42 on: March 26, 2008, 11:59:53 AM »
Question? How do we get VB to send the controls codes over the com port when needed?
see "sendserial" at http://www.machsupport.com/MachCustomizeWiki/index.php?title=Mach_specific_Subroutines/Functions_grouped_by_purpose or 4.4.10 in the customization guide.

Question Can I send a copy of the tool table to a printer port? Say LPT1
Not sure I understand what you mean.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Tool changer routine with hot swap
« Reply #43 on: March 26, 2008, 04:12:17 PM »
Hi Terry,

something like this will do it :-

dim command as string
dim byte as string
command="B000013E------"
for a=1 to len(command)
  byte=mid(command,a,1)
  putportbyte(Ox378,asc(byte)) ' Ox378 is the address of your serial port
  for b=1 to 1000
  ' this is a delay loop, adjust to get your 9 ms delay
  next
next
end

Graham.
Without engineers the world stops

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Tool changer routine with hot swap
« Reply #44 on: March 26, 2008, 04:48:45 PM »
Hi Graham - just so we don't get confused here - I take it you mean parallel port where you've written serial port. :)
Also - out of interest - what's the 9ms delay for?

Ian

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Tool changer routine with hot swap
« Reply #45 on: March 26, 2008, 04:51:29 PM »
Sorry Ian, its a reply to VMAX about his Denford ATC, I need to create a new thread, should not have hijacked this one.

Graham.
Without engineers the world stops

vmax549

*
Re: Tool changer routine with hot swap
« Reply #46 on: March 26, 2008, 05:23:33 PM »
Hi Graham, I had looked at the port command but being I am a double dummy I chose to NOT try that approach yet.
Thansk FOr the help, I am trying to get Richard up and running(;-)

Hi IAN, THe delay is to comply with the ATC requirement of a 9ms delay between charactors in the command string going to the ATC??? Yea I know weird but that is what it takes to work(;-)

I had tried using the SendSerial  VB command but I have yet to get it to work??? VB likes it but nothing ever shows up at the port(;-)

I THink I have also figured out that you cannot send anything to a printer from the MACH version of VB. I found my old copy of VB for Dummies but most of the stuff doesn't seem to work in" MACH "VB(;-(

Back to the drawing board, (;-) TP

vmax549

*
Re: Tool changer routine with hot swap
« Reply #47 on: March 26, 2008, 05:45:35 PM »
Graham in the second line VB errors on the word BYTE.
(;-) TP

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Tool changer routine with hot swap
« Reply #48 on: March 26, 2008, 06:19:25 PM »
This is a great topic. Stirling, Vmax, Poppabear, and Graham. It will have to work. I have admired all of your work for a long time.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

vmax549

*
Re: Tool changer routine with hot swap
« Reply #49 on: March 26, 2008, 07:20:03 PM »
Hi Stirling I almost missed your question. AS part of this project I would like to send a copy of the tool table AND a copy of the current slots assignment to a printer from a mach button. BUT it seems that the MACH VB does not support printing to an lpt port,at least not that I can get to work. It errors with,  not a supported object or command.

(;-) TP