5i23 does not see stand alone encoders

More
07 Dec 2012 04:01 - 07 Dec 2012 04:09 #27339 by mariusl
Hi,
I am using a 5i23 set up for eight servo channels. Five of them have a pwm and and encoder driving a vfd and motor, but two have just got encoders.
Now the five channels work fine but I cannot seem to get the two encoders to give any data. When I look at the rawcount with Halmeter, They are both sitting at 65535.

Is there a special setup for channels that just read an encoder on the servo channel?

Regards
Marius


www.bluearccnc.com

Last edit: 07 Dec 2012 04:09 by mariusl.

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

More
07 Dec 2012 04:08 - 07 Dec 2012 04:13 #27340 by PCW
Replied by PCW on topic 5i23 does not see encoders
Which fpga configuration file and daughtercards are you using?

Also forgot to add:

When debugging encoder inputs, a good thing to try is reading the A/B inputs as GPIO bits and making sure both toggle
Last edit: 07 Dec 2012 04:13 by PCW.

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

More
07 Dec 2012 04:14 #27341 by mariusl
This is what I load:

loadrt hostmot2
loadrt hm2_pci config="firmware=hm2/5i23/SVST8_4.BIT num_encoders=8 num_pwmgens=5 num_3pwmgens=0 num_stepgens=0 ,firmware=hm2/5i23/SVST4_8.BIT num_encoders=0 num_pwmgens=0 num_3pwmgens=0 num_stepgens=0 "

The daughter boards are 7i33 and 7i37.
The encoders are on the first 5i23

Regards
Marius


www.bluearccnc.com

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

More
07 Dec 2012 04:37 #27342 by PCW
Can you check that the encoder signals get to the 5i23 card?

As I mentioned, this can be done by using halmeter or show hal configuration/watch on the GPIO pins
that the encoders connect to.

(you can find out which GPIO pins by looking at the dmesg list of pins)

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

More
07 Dec 2012 05:06 #27343 by mariusl
I know where they are connected to and I used the Halmeter to see if I get any count.

This is the setup code for these encoders. Is this good enough or must I do more?
#******************************
# dual encoder functions
#******************************
# --- FRONT_ENCODER ---
net Front_Encoder-position         <=  hm2_5i23.0.encoder.05.position
net Front_Encoder-count            <=  hm2_5i23.0.encoder.05.count
net Front_Encoder-velocity         <=  hm2_5i23.0.encoder.05.velocity
net Front_Encoder-reset            <=  hm2_5i23.0.encoder.05.reset
net Front_Encoder-index-enable     <=  hm2_5i23.0.encoder.05.index-enable

# --- BACK_ENCODER ---
net Back_Encoder-position         <=  hm2_5i23.0.encoder.06.position
net Back_Encoder-count            <=  hm2_5i23.0.encoder.06.count
net Back_Encoder-velocity         <=  hm2_5i23.0.encoder.06.velocity
net Back_Encoder-reset            <=  hm2_5i23.0.encoder.06.reset
net Back_Encoder-index-enable     <=  hm2_5i23.0.encoder.06.index-enable

And this is in my INI file
				# ------------- FRONT ENCODER ------------
setp    hm2_5i23.0.encoder.05.counter-mode 0
setp    hm2_5i23.0.encoder.05.filter 1
setp    hm2_5i23.0.encoder.05.index-invert 0
setp    hm2_5i23.0.encoder.05.index-mask 0
setp    hm2_5i23.0.encoder.05.index-mask-invert 0
setp    hm2_5i23.0.encoder.05.scale  [ENC_F]ENCODER_SCALE
				# ------------- BACK ENCODER -------------
setp    hm2_5i23.0.encoder.06.counter-mode 0
setp    hm2_5i23.0.encoder.06.filter 1
setp    hm2_5i23.0.encoder.06.index-invert 0
setp    hm2_5i23.0.encoder.06.index-mask 0
setp    hm2_5i23.0.encoder.06.index-mask-invert 0
setp    hm2_5i23.0.encoder.06.scale  [ENC_B]ENCODER_SCALE


Regards
Marius


www.bluearccnc.com

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

More
07 Dec 2012 05:19 #27345 by PCW
That should be fine. What I was asking was to verify that the encoder signal gets to the 5I23 card

The first step is to make sure both A/B encoder signals signals toggle at the 5I23 GPIO pins that connect
to these encoder signals

If this doesn't happen, you will need to trace the signal back from the encoder. --> 7I33 inputs --> flatcable --> 5I23 inputs

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

More
07 Dec 2012 05:33 #27347 by mariusl
I scoped the signals from the encoders going into the 7i33. Bear in mind that all the other channels and functions on the same card is working OK. Well at least that there are signals present. I dont know if the order is correct, I will have to check.

Please confirm that I can connect an encoder by itself to a servo channel (no drive and motor).

Regards
Marius


www.bluearccnc.com

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

More
07 Dec 2012 05:36 #27348 by PCW
Yes the encoder will work by itself
Can you _please_ check the GPIO pins as I asked?

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

More
07 Dec 2012 05:41 #27349 by mariusl
I will check when I get to the machine again. Thanks for the help so far. Now that I know that it can be done, I am sure that I am going to find config problems.

Regards
Marius


www.bluearccnc.com

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

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