LinuxCNC wiring · Mesa7I96S.hal, Mesa7I96S.ini, custom_postgui.hal, pendant.hal, qtvcp_postgui.hal

Mesa7I96S

3 Mesa cards drawn from 4 HAL files and 128 signals. Check each sheet against the card’s manual before you power up.

Mesa7I96S.ini · 7I96S at 10.10.10.10 (hm2_eth)

7I96S wiring

Every 7I96S connection this config uses, drawn from the HAL. It's laid out like the real card, with the Ethernet jack pointing left. On each terminal block, pin 1 is at the bottom.

4 step/dir channels: X, Y, Z, A1 encoder (spindle encoder)P1 7I84 + 7I83 on smart serialnot used TB3 isolated I/O
FRAME GNDTB1TB2TB3FPGAMESA7I96SP2 JTAGW4downW5upIP from EEPROM(10.10.10.10)W6P1 5 VW1–3W7J1Ethernet host12+5VGNDP4 · 5 V ONLYP1 EXPANSION1GND2STEP0−3STEP0+4DIR0−5DIR0+6+5VP7GND8STEP1−9STEP1+10DIR1−11DIR1+12+5VP13GND14STEP2−15STEP2+16DIR2−17DIR2+18+5VP19GND20STEP3−21STEP3+22DIR3−23DIR3+24+5VPPIN 11GND2STEP4−3STEP4+4DIR4−5DIR4+6+5VP7ENCA+8ENCA−9GND10ENCB+11ENCB−12+5VP13IDX+14IDX−15GND16RX+17RX−18TX+19TX−20+5VP21NC22SPIN−23SPIN OUT24SPIN+PIN 11IN02IN13IN24IN35IN46IN57IN68IN79IN810IN911IN1012IN COM13OUT0−14OUT0+15OUT1−16OUT1+17OUT2−18OUT2+19OUT3−20OUT3+21OUT4A22OUT4B23OUT5A24OUT5BPIN 1STEP/DIR 4SERIALANALOGIN0–10 · unusedX driver644 steps/unit · velocitySTEP±→PUL± · DIR±→DIR±Y driver-646 steps/unit · velocitySTEP±→PUL± · DIR±→DIR±Z driver644 steps/unit · velocitySTEP±→PUL± · DIR±→DIR±A driver4.444 steps/unit · velocitySTEP±→PUL± · DIR±→DIR±Spindle encoderspeed feedback · encoder.00A± B± +5V 0V · no indexOUT0–5 · freeHost computerEthernethm2_eth → 10.10.10.105 V DC supplylogic power, 5 V only+ → P4-1 · − → P4-226-pin ribbon / DB25RS-422 breakout on P1smart serial port 1, ch 0–7e.g. Mesa 7I447I84 field I/Ochannel 0 · 7i84.1.012 pins netted7I83 analog outchannel 1 · 7i83.1.12 pins nettedCAT5STEP/DIR 0–3STEP/DIR 4 · ENC · SERIAL · ANALOGISOLATED I/O
+5 V0 V / groundXYZA (rotary/aux)Spindle encoderEthernet and smart serial

Pin by pin

TerminalWhat’s on itWire itIn HAL
Power and network
P4-1+5 V logic power (top, square pad)5 V supply +5 V only
P4-2Ground5 V supply −—
J1Ethernet to the host computerStraight CAT5 to the host's network port (card at 10.10.10.10)hm2_eth, board_ip 10.10.10.10
P1Smart serial port 1 (7I84 ch 0, 7I83 ch 1)Ribbon or DB25 to an RS-422 breakout, then CAT5 to the 7I84 (ch 0) and the 7I83 (ch 1)hm2_7i96s.0.7i84.1.0 · hm2_7i96s.0.7i83.1.1
TB1 · step and direction (5 V differential)
TB1-2 to 5X driver644 steps/unit · velocity3 STEP0+ → PUL+ · 2 STEP0− → PUL− · 5 DIR0+ → DIR+ · 4 DIR0− → DIR−stepgen.00 ← joint.0 · x-output, x-pos-fb, x-enable
TB1-1, 6GND and +5VP for channel 0Not used with differential wiring (available for single-ended wiring)—
TB1-8 to 11Y driver-646 steps/unit · velocity9 STEP1+ → PUL+ · 8 STEP1− → PUL− · 11 DIR1+ → DIR+ · 10 DIR1− → DIR−stepgen.01 ← joint.1 · y-output, y-pos-fb, y-enable
TB1-7, 12GND and +5VP for channel 1Not used with differential wiring (available for single-ended wiring)—
TB1-14 to 17Z driver644 steps/unit · velocity15 STEP2+ → PUL+ · 14 STEP2− → PUL− · 17 DIR2+ → DIR+ · 16 DIR2− → DIR−stepgen.02 ← joint.2 · z-output, z-pos-fb, z-enable
TB1-13, 18GND and +5VP for channel 2Not used with differential wiring (available for single-ended wiring)—
TB1-20 to 23A driver4.444 steps/unit · velocity21 STEP3+ → PUL+ · 20 STEP3− → PUL− · 23 DIR3+ → DIR+ · 22 DIR3− → DIR−stepgen.03 ← joint.3 · a-output, a-pos-fb, a-enable
TB1-19, 24GND and +5VP for channel 3Not used with differential wiring (available for single-ended wiring)—
TB2 · step/dir 4, encoder, serial, analog
TB2-1 to 6STEP/DIR 4Freenum_stepgens=4
TB2-7 · ENCA+Spindle encoder A+Encoder A+encoder-velocity-in ← velocity → scale.2 → scale.3 → pid.s.feedback, spindle.0.speed-in
TB2-8 · ENCA−Spindle encoder A−Encoder A−encoder-velocity-in ← velocity → scale.2 → scale.3 → pid.s.feedback, spindle.0.speed-in
TB2-9 · GNDSpindle encoder 0 VEncoder groundencoder-velocity-in ← velocity → scale.2 → scale.3 → pid.s.feedback, spindle.0.speed-in
TB2-10 · ENCB+Spindle encoder B+Encoder B+encoder-velocity-in ← velocity → scale.2 → scale.3 → pid.s.feedback, spindle.0.speed-in
TB2-11 · ENCB−Spindle encoder B−Encoder B−encoder-velocity-in ← velocity → scale.2 → scale.3 → pid.s.feedback, spindle.0.speed-in
TB2-12 · +5VPSpindle encoder +5 VEncoder +5 V supplyencoder-velocity-in ← velocity → scale.2 → scale.3 → pid.s.feedback, spindle.0.speed-in
TB2-13 to 15IDX+, IDX−, GNDLeave empty: the config doesn't use the index—
TB2-16 to 20RS-422 serial (smart serial port 0)Free: the smart-serial cards are on P1—
TB2-22 to 24Analog spindle outputFreepwmgen loaded, not connected
TB3 · isolated I/O
TB3 inputsIN0–10: free—not in any HAL file
TB3 outputsOUT0–5: free (OUT0–3 DC SSR 36 V 2 A, OUT4–5 AC SSR 100 mA)——

How the 7I96S side behaves

Step and direction are 5 V

  • Each STEP and DIR is a 5 V differential pair that can drive 24 mA. Wired as drawn, the + side goes to the driver's + input and the − side to its − input.
  • The other way, which Mesa suggests for drives that need more current: PUL+ and DIR+ to +5VP, PUL− to STEP−, DIR− to DIR−.
  • Drivers that ship set for 24 V signals need their selector moved to 5 V.

Encoder and isolated I/O

  • The encoder takes 5 V from TB2-12 and returns to TB2-9. Jumpers W1–W3 choose differential (right) or single-ended TTL (left).
  • IN0–10 are isolated inputs sharing IN COM (TB3-12), for either polarity of field supply.
  • OUT0–3 are floating DC solid-state relays (36 V, 2 A); OUT4–5 are AC (100 mA). Each is a contact, not a voltage source.

Power and smart serial

  • P4 takes 5 V only: pin 1 (top, square pad) is +5 V and pin 2 is ground. Any other voltage damages the card.
  • The +5VP pins on TB1 and TB2 are 5 V outputs with resettable fuses (PTCs), for field wiring.
  • Smart-serial port 0 is on TB2-16 to 19. Firmware with a second port puts it on P1, the 26-pin header, with channels 0–7 through an RS-422 breakout.

Check these before relying on it

  • IP address jumpers. The config talks to 10.10.10.10. That needs W4 down and W5 up, so the card uses the address stored in its EEPROM. Both down gives 192.168.1.121; the EEPROM address is set with mesaflash --set ip=….
  • Driver signal voltage. STEP and DIR are 5 V differential. Many drivers (the CL57T and CL86T among them) ship set for 24 V signals: set their 5V/24V selector to 5 V or they can miss steps.
  • Encoder mode. Jumpers W1–W3 must match the encoder: right for differential, left for single-ended TTL. With a single-ended encoder, wire only A+ and B+.
  • P1 breakout power. W6 up sends 5 V out on DB25 pins 22–25 to power the breakout. Use it only with a Mesa breakout that expects it (for example a 7I44).
  • Frame ground. Connect the top-left mounting hole, beside the Ethernet jack, to the machine's earth.
Mesa7I96S.ini · 7I84U on smart serial (hm2_7i96s.0.7i84.1.0)

7I84U wiring

Every 7I84U terminal this config uses, drawn from the HAL as it stands. Laid out like the real card, with the RJ-45 pointing left: TB3 runs down the right edge with pin 1 at the bottom, so the outputs are at the top and the inputs at the bottom. Field power is taken as 24 V DC.

5 outputs used (TB3-17, TB3-19, TB3-22, TB3-23, TB3-24)7 inputs usedmixed outputsnot used TB2
TB1TB2 · not usedTB3FIELD I/OINTERFACEMESA7I84UW1left (default): VIN from VFIELDBW3left: operateJ1 · SERIAL123456789101112131415161718192021222324PIN 1OUT15OUT8IN31IN16123456789101112131415161718192021222324PIN 1IN0IN1IN2IN3IN4IN5IN6IN7IN8IN9IN10IN11IN12IN13IN14IN15OUT0OUT1OUT2OUT3OUT4OUT5OUT6OUT70 Vfield supply −+24 Vfield supply +X home switchuses -not · NC, opens to triggerinput-00-notY home switchuses -not · NC, opens to triggerinput-01-notZ home switchuses -not · NC, opens to triggerinput-02-notTouch probeuses -not · NC, opens to triggerinput-03-notE-stop chainon when fed +Vinput-04A drive faulton when fed +Vinput-05Tool setteruses -not · NC, opens to triggerinput-06-notMachine onsourcingoutput-00Laser (−)sinking · M64/M65 P1output-02Load supply +its − to field 0 VDrawbar liftsourcing · M64/M65 P0output-05Mist coolantsourcing · M7 · M9output-06A drive enablesourcing · invertedoutput-0712345678PIN 1VFIELDBVFIELDBVFIELDAVFIELDAVIN (W1)GNDGND spareGND spareTB1-1, 2 power TB2TB1-3, 4 power TB324 V DC supplyfield powerwire direct, no switch−++ also feeds the +24 V rail on the right,− the 0 V rail7I96S via P1smart serial port 1, ch 0Ethernet 10.10.10.10hm2_7i96s.0.7i84.1.0CAT5
+24 V field supply0 V / groundHomingProbe and tool setterE-stop and safetyMotor drivesMachine powerG-code I/O (M64–M68)Tool change and drawbarCoolant, air and lube

Pin by pin

TerminalWhat’s on itWire itIn HAL
Power · TB1
TB1-1, 2, 3, 4VFIELDB and VFIELDA, field power+24 V supply, wired directpowers TB2 (1–2) and TB3 (3–4)
TB1-6Ground (7 and 8 are spare grounds)24 V supply −common for VIN and VFIELD
TB1-5VIN, logic powerLeave empty with W1 in its default left position—
J1Smart serial to the 7I96SStraight CAT5hm2_7i96s.0.7i84.1.0
Inputs (on when fed +24 V)
TB3-1 · INPUT0X home switchuses -not · NC, opens to trigger+24 V → NC switch/sensor → TB3-1home-x ← input-00-not → joint.0.home-sw-in
TB3-2 · INPUT1Y home switchuses -not · NC, opens to trigger+24 V → NC switch/sensor → TB3-2home-y ← input-01-not → joint.1.home-sw-in
TB3-3 · INPUT2Z home switchuses -not · NC, opens to trigger+24 V → NC switch/sensor → TB3-3home-z ← input-02-not → joint.2.home-sw-in
TB3-4 · INPUT3Touch probeuses -not · NC, opens to trigger+24 V → NC switch/sensor → TB3-4probe-workpiece ← input-03-not → probe-or → motion.probe-input, milo.led-probe
TB3-5 · INPUT4E-stop chainon when fed +V+24 V → switch/sensor → TB3-5estop-ext ← input-04 → iocontrol.0.emc-enable-in
TB3-6 · INPUT5A drive faulton when fed +V+24 V → switch/sensor → TB3-6a-fault ← input-05 → joint.3.amp-fault-in
TB3-7 · INPUT6Tool setteruses -not · NC, opens to trigger+24 V → NC switch/sensor → TB3-7raw-toolsetter-in ← input-06-not → dbounce.0 → probe-or → motion.probe-input, milo.led-probe
Outputs (500 mA max each)
TB3-17 · OUTPUT0Machine onsourcingTB3-17 → load +, load − → 0 Vmachine-is-enabled ← motion.motion-enabled → output-00
TB3-19 · OUTPUT2Lasersinking · M64/M65 P1load supply + → load +, load − → TB3-19laser-on ← laser-or ← motion.digital-out-01, milo.laser → output-02
TB3-22 · OUTPUT5Drawbar liftsourcing · M64/M65 P0TB3-22 → load +, load − → 0 Vdrawbar-lift ← motion.digital-out-00 → output-05
TB3-23 · OUTPUT6Mist coolantsourcing · M7 · M9TB3-23 → load +, load − → 0 Vcoolant-mist ← iocontrol.0.coolant-mist → output-06
TB3-24 · OUTPUT7A drive enablesourcing · invertedTB3-24 → load +, load − → 0 Va-enable ← joint.3.amp-enable-out → output-07
Everything else
TB3 · 12 freeINPUT 7–15 · OUTPUT 1, 3–4: free—not in any HAL file
TB2 · 24 freeINPUT 16–31 · OUTPUT 8–15: free—not in any HAL file

How the 7I84U side behaves

Inputs see voltage

  • An input is on when it's fed field voltage. A wire to ground or an open wire reads off. Each input has 22 kΩ to ground inside.
  • Wire every switch from +24 V to the input. Normally-closed switches read as triggered when a wire is cut, the safe way to fail; HAL uses the -not pins for them.

Outputs switch the field supply

  • A sourcing output goes to +24 V when on: wire the load's + to the terminal and its − to 0 V. A sinking output connects its terminal to 0 V instead, so the load's + goes to its own supply.
  • 500 mA per output, and 2 A in total for each group of eight (they share a driver chip). An output trips at about 1.5 A on a short.
  • No flyback diodes needed on valves or relay coils: the drivers have clamps built in.
  • output_source and output_sink are bitmasks with one bit per output. Both set makes it push-pull.

Power on TB1

  • VFIELDA (TB1-3, 4) powers TB3 and sets its input thresholds. VFIELDB (TB1-1, 2) does the same for TB2. Supply both or the card won't start.
  • Wire VFIELD straight to the supply. Never switch it through a relay contact or a switch.
  • VIN (TB1-5) can stay empty: jumper W1 in its left-hand (default) position takes it from VFIELDB.

Check these before relying on it

  • Field voltage. This page assumes 24 V DC on VFIELD. Every valve, relay and driver input wired here must suit the same voltage.
  • Machine on: current. TB3-17 can drive 500 mA. A contactor coil bigger than that needs an interposing relay.Mesa7I96S.hal:414
  • Laser: its own supply. TB3-19 sinks: when on it connects the load's − to 0 V. Feed the load's + from a supply that suits it, with that supply's − tied to this card's field ground (TB1-6 to 8). Never move it to a sourcing output, which gives the full 24 V.Mesa7I96S.hal:276
  • TB3-24 is inverted. output-07-invert is true, so the output is on while its signal is false, including while the machine is off.Mesa7I96S.hal:255
  • Smart serial cable. J1 is an RJ-45 for a straight CAT5 cable to smart-serial port 1, channel 0 of the 7I96S, which this firmware puts on P1 (P1-01/DB25-01, P1-05/DB25-03).
Mesa7I96S.ini · 7I83 on smart serial (hm2_7i96s.0.7i83.1.1)

7I83 wiring

The 7I83 does one job here: it sets the spindle speed with a ±10 V signal and enables the drive. Drawn from the HAL and laid out like the real card, with the RJ-45 pointing left and TB2's pin 1 at the bottom.

1 of 6 channels used (TB2-1 to 4)±10 V AOUT0: Spindle speedenable ENA0: Spindle enable8–35 V VIN on TB1
ANALOG SERVO INTERFACEMESA7I836 × ±10 V isolated analog outTB2CH0CH1CH2CH3CH4CH5ANALOG OUT · ENA OUT 0..5W1up: operate1ENA0−2ENA0+3AGND4AOUT05ENA1−6ENA1+7AGND8AOUT19ENA2−10ENA2+11AGND12AOUT213ENA3−14ENA3+15AGND16AOUT317ENA4−18ENA4+19AGND20AOUT421ENA5−22ENA5+23AGND24AOUT5PIN 1channels 1–5 · free12VINGNDTB18–35 V DC supplyabout 1 W · e.g. the 24 V supply+ → TB1-1 · − → TB1-2−+J1 · SERIAL7I96S via P1smart serial port 1, channel 1hm2_7i96s.0.7i83.1.1CAT5Spindle driveanalog command inputenable − / 0 Venable input +command − / SGcommand + (±10 V)enable: check sinking or sourcingshieldedtwisted pair,shield at 7I83From LinuxCNCM3/M4 S… sets the speedM3: −0.0034 V per rpm (scale.0)M4: +0.0034 V per rpm (scale.1)enable: spindle.0.onsignal ground → 7I83 TB1-2(a separate wire)
VIN + (8–35 V)0 V / groundSpindle speed (analog)Drive enableSmart serial

Pin by pin

TerminalWhat’s on itWire itIn HAL
Power and serial
TB1-1 · VINPower, 8–35 V DCSupply +—
TB1-2 · GNDGround (same as analog ground)Supply −, and a separate wire from the drive's signal ground—
J1Smart serial to the 7I96SStraight CAT5 to smart-serial port 1, channel 1 (P1 (P1-02/DB25-14, P1-06/DB25-16))hm2_7i96s.0.7i83.1.1
TB2 · channel 0, spindle speed
TB2-4 · AOUT0Spindle speed command, ±10 VM3/M4 S… sets the speed→ drive command input +, one wire of a shielded twisted pairspindle_adjusted_out ← scale.0 ← mux2.0 ← spindle.0.speed-out-abs, spindle.0.reverse → analogout0
TB2-3 · AGNDAnalog reference for AOUT0→ drive command − / signal ground, the other wire of the pair; shield here only—
TB2-2 · ENA0+Enable switch, + sideSpindle enable→ drive enable input (the more positive side)spindle-enable ← spindle.0.on, whb.halui.spindle.is-on → analogena0
TB2-1 · ENA0−Enable switch, − side→ drive enable common / 0 V sideanalogena0
TB2 · free channels
channels 1, 2, 3, 4, 5ENA, AOUT and AGNDFreenot in any HAL file

How the 7I83 side behaves

The analog output

  • Each AOUT gives −10 to +10 V, measured against the AGND pin beside it. Load it with 2 kΩ or more.
  • Mesa suggests shielded twisted pair: AOUT to the drive's command input, AGND to its reference, and the shield to AGND at the 7I83 end only.
  • The output is isolated from the 7I96S, which helps avoid ground loops.

The enable output

  • Each ENA is a floating optocoupler switch: up to 100 V DC and 50 mA. It is polarised, so ENA+ must be the more positive side. Reversing it can damage it.
  • The enable also gates the analog output. While ENA is off, its AOUT is held at 0 V.
  • If communication with the 7I96S stops for more than 50 ms, all outputs go to 0 V and every enable turns off. That doesn't replace an E-stop that removes drive power.

Power and serial

  • TB1-1 VIN takes 8–35 V DC (about 1 W). TB1-2 is ground, and it's connected to the analog ground.
  • Mesa suggests putting the VIN supply near the drive it signals to, for the best noise isolation.
  • J1 takes a straight CAT5 cable from the host's smart-serial port. That cable also powers the 7I83's serial side (30 mA).

Check these before relying on it

  • Speed polarity. With M3 the config sends a negative voltage on AOUT0 (scale.0 −0.0034 V per rpm, about −3.4 V at 1000 rpm), and with M4 a positive one (scale.1 +0.0034). If the drive is set for 0–10 V only, M3 won't turn the spindle: set the drive for ±10 V, or change the gains and use its direction input.Mesa7I96S.hal:331
  • AOUT0 tops out early. At 3000 rpm the gain asks for 10.2 V, but the 7I83 stops at ±10 V, so speeds above about 2941 rpm read the same.Mesa7I96S.hal:331
  • Drive ground. Mesa says to run a separate wire from the drive's signal ground to the 7I83's TB1 ground, besides the AGND in the twisted pair.
  • Enable polarity. ENA is a polarised optocoupler switch: ENA+ must be the more positive side. For a sinking drive enable (its common to +24 V), ENA+ goes to the enable input and ENA− to the drive's 0 V. For a sourcing one, ENA+ goes to the drive's +V and ENA− to the enable input.
  • W1 jumper. Up (the default) is operate mode at 2.5 Mbaud, which the host card needs. Down is setup mode at 115.2 kbaud.
  • Smart serial cable. J1 takes a straight CAT5 cable from smart-serial port 1, channel 1 of the 7I96S, which this firmware puts on P1 (P1-02/DB25-14, P1-06/DB25-16).