Difficulty building RTAI linuxcnc from source

More
3 years 3 months ago #276118 by southbayguy
The odd thing is that the Motenc 7544 board is the Motenc-Lite board.

www.vitalsystem.com/portal/motion/motenc/motenc_lite.php

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

More
3 years 3 months ago #276135 by andypugh
OK, so we need to work out what values the driver is reading from the card to see where it is getting confused.

And setting the debug level higher ought to be giving us that information.

The driver does override the msg_level in one place, but should set it back afterwards.
github.com/LinuxCNC/linuxcnc/blob/2.8/sr...rs/hal_motenc.c#L451
The following user(s) said Thank You: southbayguy

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

More
3 years 3 months ago #276160 by southbayguy
I have tried varying the J7 jumpers. According to Vital Systems documentation for the Motenc Lite boards, there is a bit 0 board ID jumper and a bit 1 board ID jumper, and when the jumper is installed the value is 0. Even if I'm misunderstanding the Vital Systems documentation, there are only four states those two J7 jumpers can be in, and I have tried all four. The debug output has not changed. I have also tried setting the debug output at 5 and at ALL, again with no change. Looking at the hal_motenc.c code, the two board ID values the code considers valid are 0 and 1. If the board ID is zero, then the code thinks the board is a Motenc-100 board. If the board ID is zero, then the code thinks the board is a Motenc-Lite board. If the board ID is not zero or one, then the hal_motenc code writes an error "unknown card detected."
After trying these variations, with no change in result, I'm wondering if there might be something funkier going on, like the hal_motenc code is looking for the board ID in the wrong place ... something like that.
My confidence in the board itself is high because it has run a CNC mill for seven or eight years, running under Ubuntu. This was the original installation of LinuxCNC you helped me with. Both J7 jumpers were installed when the board was running that original machine.
I'm thinking the code (specifically the hal_motenc driver) has evolved since then while the Motenc hardware has not. Back when we put the first machine together, the Motenc-Lite board was mainstream hardware and the code expected its use. Perhaps that isn't true any more.

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

More
3 years 3 months ago #276161 by andypugh
boardID is different to fpga[0].boardVersion
That's reading something from the FPGA, but it's hard to know what without the debug working.

It really should be telling us what it found in this line:
Code:
rtapi_print_msg(RTAPI_MSG_INFO, "MOTENC: Card is %s, ID: %d\n", pDevice->pTypeName, pDevice->boardID);

Is there any chance that the FPGA has been reprogrammed by someone, at some time?
The following user(s) said Thank You: southbayguy

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

More
3 years 3 months ago #276165 by southbayguy
There is no chance. No one has messed with the FPGA. I'm the only person who has even handled the board.

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

More
3 years 3 months ago #276173 by andypugh
And, as fas as I can tell no-one has done anything much with the Motenc driver either.
The last significant change was in 2012:
github.com/LinuxCNC/linuxcnc/commit/3d26...5363f1aeaaff3c4174b9

Are you running released LinuxCNC or compiling it yourself? (I have been assuming the former)
The following user(s) said Thank You: southbayguy

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

Time to create page: 0.407 seconds
Powered by Kunena Forum