From: Jon E. <el...@pi...> - 2004-05-06 15:48:12
|
brane wrote: > hello > >------------------------------------------------------------------------ > > Hi ! > > > I have two problems with my EMC : 1) home switch indentification > 2) analog output for the spindle > > Can anybody help me, because I tried many things (also sugestions written in manuals > and discussions on he Source Forge forum for EMC), but it looks that > I come in the position I have no more ideas what to do , only to start to > debug programs (I am new to Linux, also I am not programmer by profession > but electronic and till now I didn't touch EMC programs; if it is necesary > I willdo this with the help of my friends); Perhaps I missed something > trivial in the manuals but I dont' know what. > > > My configuration : a) 3 axis mill > b)PC with pentium 233 MHz and Servo To Go II Card > c) BDI with Linux 6.2 > d) in emc.ini > - bridgeporttask and bridgeport: for IO tasks > - stg2mod :for servotasks > > Do you have an index channel on your encoders? If not, wire the A channel of the encoder to the index input. EMC requires a transition on the index signal to qualify the home switch. (Or, you can recompile EMC with the has_home_switches compile- time variable disabled.) > - with the lstg program I tested inputs on STG card and they > all responds, also respond index pulse for the incremental > encoder > > So you do have an index channel on the encoders? Now I'm confused. That should work. The test program shows the encoder index coming true for a short distance every encoder turn? I haven't run the STG-2, but it should work. > > > Problem Nr.2 : > What to do (which commands or procedures) to get analog output ? > ( to run the spindle with the speed written in S command: > - to use 4 th axis on the STG II card?; > - to use another card? which? > - to use some bit on the parallel or serial port in the PWM mode?) > > In the ini file, there is a place in the EMCIO section (at the end) where it should say something like : ; analog out bits SPINDLE_ON_INDEX = 3 MAX_VOLTS_PER_RPM = 0.001 Min_VOLTS_PER_RPM = -0.001 This means axis 3 (the 4th axis on the STG card) will output spindle speed info. This axis must be unused by motion control (axis) code, so it should be one greater than the highest numbered axis in the section just above. The max and min parameters scale the speed from the S word in the G-code. The above numbers would give 1 volt at the DAC for every 1000 RPM, over a range from 0 to 10,000 RPM. The signs as set above make it always generate a positive voltage for both directions (CW and CCW). If both signs are positive, it will generate a bipolar voltage where -10V is maximum CCW and +10 V is max CW. EMC does not support PWM outputs from the parallel port, directly. Jon |