Raspberry Pi 4 & MESA 7i92

More
6 years 7 months ago #159876 by PCW
Replied by PCW on topic Raspberry Pi 4 & MESA 7i92
motmod: already exists

is the likely reason LinuxCNC is not starting
This maybe due to a hal file error or a previous failed
LinuxCNC run

You should be able to use pncconf to create a template hal/ini file set
(say for a 5i25) and just change the driver and board name and perhaps some
GPIO numbers to get a working configuration

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

More
6 years 7 months ago - 6 years 7 months ago #162109 by ajsinfotech
Thanks Peter! Finally linuxcnc is up and running.


Now I need to use one encoder from mesa 7c81 but differs a bit from the linuxcnc module version. I need to use the encoder as a simple counter (just input A in counter-mode).

Is there any example using an encoder from a mesa card?

Thanks!
Last edit: 6 years 7 months ago by ajsinfotech.

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

More
6 years 7 months ago #162115 by PCW
Replied by PCW on topic Raspberry Pi 4 & MESA 7i92
You can use the normal encoder counter as a simple (A only) counter by setting
the encoders counter-mode parameter true. This sets the encoder counter into UP/DOWN
mode. Beware that the "B" input sets the count direction in UP/DOWN mode.

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

More
6 years 7 months ago - 6 years 7 months ago #162116 by ajsinfotech
Thanks Peter!

You can use the normal encoder counter

What do you mean "normal-encoder"? The software module provided by linuxcnc? I want to use the hardware module from 7c81 to relief my RPi3 cpu workload.

I already have running the software encoder. I want to use the hardware one that the 7c81 provides.
I'm using a RPi3 so I don't want to overload the cpu, that's why I decide to add a 7c81 to the project.

Thanks!
Last edit: 6 years 7 months ago by ajsinfotech.

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

More
6 years 7 months ago #162117 by PCW
Replied by PCW on topic Raspberry Pi 4 & MESA 7i92
I mean the HM2 hardware encoder module has a UP/DOWN mode

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

More
6 years 7 months ago - 6 years 7 months ago #162118 by ajsinfotech
ok, I use

# IO Pin 014 (P1-21): Encoder #0, pin A (Input)
setp hm2_7c81.0.encoder.00.counter-mode true

I get a perfect square signal from the scope but when I connect to the P1-21 pin from the 7c81 it keeps the level high.

BTW
Code:
... hm2/hm2_7c81.0: IO Pin 013 (P1-19): IOPort hm2/hm2_7c81.0: IO Pin 014 (P1-21): Encoder #0, pin A (Input) hm2/hm2_7c81.0: IO Pin 015 (P1-23): Encoder #0, pin B (Input) hm2/hm2_7c81.0: IO Pin 016 (P1-25): Encoder #0, pin Index (Input) hm2/hm2_7c81.0: IO Pin 017 (J5-TX0): IOPort ...

But halshow shows it as an OUT pin. So... :huh:
No count detected in halshow.

What I'm doing wrong? :unsure:
Last edit: 6 years 7 months ago by ajsinfotech.

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

Time to create page: 0.419 seconds
Powered by Kunena Forum