Raspberry Pi4B and Mesa7C80 setup for a beginner

More
09 Nov 2024 07:51 - 10 Nov 2024 03:29 #314113 by d3m0n54in7
I had the idea to purchase the Mesa 7C80 board and a Raspberry Pi 4B to build my own control panel and have run head first into a severe lack of knowledge coupled with almost zero sources to find answers. I have used Raspberry Pis for other projects like media servers and 3d printer farms but I have really over extended myself on this one. I would greatly appreciate it if some of the individuals here that have successfully configured their own machines could assist me and hopefully I can build a guide so that others can learn how to configure these boards since they really do seem to be worth the investment. 
1) I downloaded the Debian image shared by user shepherps and loaded it into my Pi. www.linuxcnc.org/iso/rpi-4-debian-bookwo...23-11-17-1731.img.xz
2) I adjusted the config file in the SD card to allow SPI
3) I modified the ribbon cable purchased from Mesanet so that it was about 2 inches long.
4) I changed the Region setting to US UT8  (I was receiving errors just trying to calculate the steps in pncconf and found the answer to be this)
5) I used mesaflash to verify that the board could communicate with the Pi
6) I used pncconf to generate the 7i96d with ini substitution enabled and then changed the instance of "CARD0=7I96.0" to "CARD0=7C80.0" 

File Attachment:

File Name: linuxcncreport.txt
File Size:5 KB

7) Changed "hm2_eth" to "hm2_rpspi" in the .hal file to change the communication driver from ethernet to SPI

To be honest I'm basically a script kiddie when it comes to Linux and Pis, I'm more of an arduino and FANUC guy so most of the other threads have gone over my head but I used to be proficient in DOS so far from intimidated by the terminal. I have attached my most recent error log to show where I'm stuck at now.
Attachments:
Last edit: 10 Nov 2024 03:29 by d3m0n54in7. Reason: added additional information and corrected typos

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

More
09 Nov 2024 12:21 #314118 by tommylight
From your error report:
./CNC_V_Mill.hal:10: parameter or pin 'hm2_7c80.watchdog.timeout_ns' not found
6722
So just omit that line in the hal file and try again.

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

More
09 Nov 2024 14:19 #314120 by PCW
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2

You still have the Ethernet driver (hm2_eth) invoked in the hal file, you need the
RPI4 SPI driver (hm2_rpspi)
The following user(s) said Thank You: d3m0n54in7

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

More
10 Nov 2024 03:24 #314172 by d3m0n54in7
Thank you very much for the response. It was indeed the hm2_eth that I needed to change to hm2_rpspi. I also needed to change the CARD0=hm2_7c80 to CARD0=hm2_7c80.0
The next hurdle to surmount is a simple syntax issue. Terminal blocks 1 and 2 are inmux which has gone over my head. After reading the HOSTMOT2 documentation (www.linuxcnc.org/docs/html/man/man9/hostmot2.9.html
inmuxes have names like "hm2_<BoardType>.<BoardNum>.inmux.<Instance>". "Instance" is a two-digit number that corresponds to the HostMot2 inm or inmux instance number. There are "num_inms" or numx_inmuxs" instances, starting with 00. So if I want to use TB1 pin 7 for a "door closed" signal, following the manual, it's INPUT6. Would it be hm2_7c80.0.inmux06 ? What about activating TB2 pin 1 for INPUT COMMON 0?

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

More
10 Nov 2024 14:39 #314191 by PCW
You can actually ignore all the inmux setup in the manual
and not have any inmux related statements in the configuration
string.

One of the best ways to determine the pin/parameter names is with halcmd or halshow
for example, this command in a terminal when LinuxCNC is running:

halcmd show pin hm2

Will show all hardware pins, while:

halcmd show pin *inmux*

will show all inmux pins

You can also do this with halshow, You can launch halshow from axis
with Machine --> Show Hal Configuration. The "Watch" tab of halshow
allows you to monitor pins in real time.
 

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

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