Wiring 7i96 and THCAD

More
30 May 2019 07:30 #135365 by AgentWD40
Replied by AgentWD40 on topic Wiring 7i96 and THCAD
Houston, we have a problem.

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.

More
30 May 2019 07:36 #135367 by rodw
Replied by rodw on topic Wiring 7i96 and THCAD
I just posted this on the plasmac thread.

Ignore the pin numbers in brackets as I broke something.

You should be able to ee the encoder counts flickering around the 0 volt frequency
Attachments:

Please Log in or Create an account to join the conversation.

More
30 May 2019 08:09 #135369 by phillc54
Replied by phillc54 on topic Wiring 7i96 and THCAD
Could you post your HAL file

Cheers, Phill.

Please Log in or Create an account to join the conversation.

More
30 May 2019 13:00 #135384 by PCW
Replied by PCW on topic Wiring 7i96 and THCAD
Sounds like you did not set the encoder to up/down mode.

Please Log in or Create an account to join the conversation.

More
30 May 2019 13:59 - 30 May 2019 14:26 #135389 by AgentWD40
Replied by AgentWD40 on topic Wiring 7i96 and THCAD

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.

File Attachment:

File Name: my_plasma.ini
File Size:9 KB

File Attachment:

File Name: my_plasma.hal
File Size:14 KB

File Attachment:

File Name: my_plasma_...ions.hal
File Size:1 KB


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?
Attachments:
Last edit: 30 May 2019 14:26 by AgentWD40.

Please Log in or Create an account to join the conversation.

More
30 May 2019 14:25 #135391 by PCW
Replied by PCW on topic Wiring 7i96 and THCAD
setp hm2_7i96.0.encoder.00.counter-mode 1

(man hostmot2)
The following user(s) said Thank You: AgentWD40

Please Log in or Create an account to join the conversation.

More
30 May 2019 14:42 - 30 May 2019 14:46 #135393 by AgentWD40
Replied by AgentWD40 on topic Wiring 7i96 and THCAD
Well that would be just to simple ;) I'll give it a shot when I get back to the machine this evening.

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
Last edit: 30 May 2019 14:46 by AgentWD40.

Please Log in or Create an account to join the conversation.

More
30 May 2019 15:10 #135396 by PCW
Replied by PCW on topic Wiring 7i96 and THCAD
setp hm2_7i96.0.encoder.00.filter 0

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
The following user(s) said Thank You: AgentWD40

Please Log in or Create an account to join the conversation.

More
30 May 2019 15:38 - 30 May 2019 15:59 #135397 by AgentWD40
Replied by AgentWD40 on topic Wiring 7i96 and THCAD

...
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?
Last edit: 30 May 2019 15:59 by AgentWD40. Reason: Changed jumper plan per Peter's reply

Please Log in or Create an account to join the conversation.

More
30 May 2019 15:48 - 30 May 2019 16:01 #135398 by PCW
Replied by PCW on topic Wiring 7i96 and THCAD
No, when the encoder is in UP/DOWN mode A is the clock and B is the direction
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
Last edit: 30 May 2019 16:01 by PCW.
The following user(s) said Thank You: AgentWD40

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.140 seconds
Powered by Kunena Forum