Wiring 7i96 and THCAD
I have the THCAD10 wired into the 7i96 but I don't seem to be able to get a frequency reading.
FO+ to ENA+
FO- to ENA-
5v and gnd
Divider is set to F/32, and W1 is in the UP position for unipolar.
*Note #1: the silkscreen for the W1 jumper is quite confusing compared to the manual.
* #2: the silkscreen on the P1 connector shows from top down: +5v FO- FO+ BUT the manual shows +5v FO+ FO- !!
The thcad LED slowly blinks, and when I apply voltage to the IN pins it blinks faster.
Looking at the Hal Config watch window, hm2_7i96.0.encoder.00.velocity is always zero.
.count and .position alternate from 0 to -1
.input-a blinks
.rawcounts alternates from 0 to 1
.sample-frequency is constant at 25000000
My first attempt I wired FO and ENA +- per the silkscreen, which I believe was backwards. After finding the discrepancies in the manual I switched the +- around. Could this possibly had fried something? I've tried bipolar and unipoler, F/1 and F/32.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Cheers, Phill.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Sounds like you did not set the encoder to up/down mode.
How do I do that exactly?
Here's what I see in the manuals
ENCODER INPUT MODE
The 7I96s high speed encoder input can be programmed for differential or single ended mode operation. W2, W3 and W4 set the encoder input mode. When W2,W3,andW4 are in the right hand position, the encoder input is mode is differential. When W2,W3,and W4 are in the left hand position, the encoder input mode is single ended or "TTL". Note that W2 controls the input mode for the ‘A’ signal, W3 controls the input mode for the‘B’ signal and W4 controls the input mode for the index signal.
My 7i96's W2, W3, and W4 jumpers are all to the right hand side.
READOUT VIA ENCODER COUNTER (EMC)
The HostMot2 encoder counter firmware is capable of measuring input frequency.The HostMot2 drivers velocity output is proportional to the input frequency and can be used to read out the THCADs analog input voltage. To do this, the encoder counter must be set to up/down mode, and the count input (A) connected to the THCADs frequency output. The velocity output must be offset and scaled to get a direct voltage number.
Is this all in the firmware or config or??? Can someone provide an example?
@phillc54 et al I've attached *some* of my config files.
It's relatively minimal config. All generated by pncconf then processed by configurator.py, with minimal hand editing just to get linuxcnc to load. I started to add config to mess with rodw's scalethecad.comp but hadn't set it up properly yet and havn't tried it, it's all commented out.
I've omitted the rest of the plasmac configurator generated hal files, let me know if you still need to see them.
[edit]
looking back at the configs now I see I managed to include pid and configs for a spindle... could that be interfering? Should I delete all of that stuff?
Please Log in or Create an account to join the conversation.
(man hostmot2)
Please Log in or Create an account to join the conversation.
So considering that, and what I now see here on this config , would I also need to add these lines?:
#filter mode now set to false for divide by 1 THCad mode
setp hm2_7i96.0.encoder.00.filter 0
setp hm2_7i96.0.encoder.00.scale -1
If so what are the values need to be in my case? Based on man hostmot2 I'm guessing filter 0 and scale 1
Please Log in or Create an account to join the conversation.
needed for /1 mode but filter should be enabled for /32 mode
setp hm2_7i96.0.encoder.00.scale -1
This is if the encoder B input is unconnected ( the encoder B input is the UP/DOWN signal when in UP/DOWN mode )
Its best to set the B encoder input to TTL mode since the differential mode polarity is
not well defined when left unconnected. If you ground the encoder B input (and the
encoder B input is in TTL mode), the scale would be 1
Please Log in or Create an account to join the conversation.
...
the encoder B input is the UP/DOWN signal when in UP/DOWN mode
...
Well I'm confused again. Am I supposed to be using B instead of A?
If not here is the plan sticking with ENA:
7i96 jumpers W2 to the right for differential, W3, and W4 to the LEFT for TTL mode. THCAD10 jumper for F/32 and unipolar input with the jumper over the TOP two pins.
setp hm2_7i96.0.encoder.00.counter-mode 1
setp hm2_7i96.0.encoder.00.filter 1
setp hm2_7i96.0.encoder.00.scale -1
net plasmac:arc-voltage-in hm2_7i96.0.encoder.00.velocity => plasmac.arc-voltage-in
The way I'm reading it the THCAD silkscreen and W1 jumper and the THCAD manual are conflicting. Can you clarify?
Also, the FOUT+- pins are swapped around between the manual and silkscreen. Could reversing these pins do any damage to the 7i96 or thcad?
Please Log in or Create an account to join the conversation.
So B can never be used as a clock signal but it _does_ determine the count direction
This is why I suggested setting the B encoder input to TTL mode (so it has a defined state when left unconnected)
but using differential mode on the A encoder input (since this mode has the best noise immunity)
FOUT+ and FOUT- can be swapped, it makes no difference which way they are connected as long as
they go to the A and /A encoder pins
I'll take a look at the manual
Please Log in or Create an account to join the conversation.