LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
28 Jun 2025 05:57 #330948 by epineh
I'm doing some boards up that will use shift registers so I will do some testing, and see what happens. Worst case is I design it so that the shift register outputs aren't enabled until Linuxcnc is started and communicating with the FPGA. 

Cheers.
Russell.

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

More
28 Jun 2025 21:57 #330979 by mBender
Hi, 

after a few month working with my bread board set up, I am continuing to build up a PCB board. The pin connection is currently all over the place, but it works... I am cleaning that up and have a quick question about the Tang Nano 9k. I am palling to use Bank 1 and 2(3.3V) for the input and outputs. I don't need to use Bank 3 (1.8V) as my machine is not that complicated. 

Are all Pins from Bank 1 and 2 usable as Inputs and Outputs or are there special pins which need to be high or low at boot?? Similar to some Microcontroller?

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

More
29 Jun 2025 05:52 #330991 by Happppppppy
Hi,

I have a Terasic DECA Max 10 (10M50DAF484C6GES) fpga dev board that i'm thinking about using as my LinuxCNC hardware step generator. If anyone has any thoughts on why this won't work that would be amazing before I jump into trying to get this to work.

Board details are here:
www.terasic.com.tw/cgi-bin/page/archive....yNo=&No=944&PartNo=1

Cheers,
Cam

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

More
29 Jun 2025 06:34 #330992 by meister
@mBender
you can use all pins freely and the 1.8v pins are well suited as inputs as they are 3.3v tollerant.

@Cam
Max 10 works, but not the onboard Ethernet, you need to use W5500 or SPI

Cheers,
Olli
The following user(s) said Thank You: Happppppppy

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

More
03 Jul 2025 15:27 #331166 by Tim Bee
Dear meister:
 when I updated RIO, I got error:

riocomp.c: In function ‘register_signals’:
riocomp.c:692:52: error: ‘data_t’ has no member named ‘SIGIN_QUADENCODERZ0_INDEXOUT_INDEX_RESET’; did you mean ‘SIGIN_QUADENCODERZ0_INDEXOUT_not’?
  692 |     if (retval = hal_pin_bit_newf(HAL_OUT, &(data->SIGIN_QUADENCODERZ0_INDEXOUT_INDEX_RESET), comp_id, "%s.quadencoderz0.indexout-reset", prefix) != 0) error_handler(retval);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                    SIGIN_QUADENCODERZ0_INDEXOUT_not
riocomp.c:694:52: error: ‘data_t’ has no member named ‘SIGIN_QUADENCODERZ0_INDEXOUT_INDEX_WAIT’; did you mean ‘SIGIN_QUADENCODERZ0_INDEXOUT_not’?
  694 |     if (retval = hal_pin_bit_newf(HAL_OUT, &(data->SIGIN_QUADENCODERZ0_INDEXOUT_INDEX_WAIT), comp_id, "%s.quadencoderz0.indexout-wait", prefix) != 0) error_handler(retval);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                    SIGIN_QUADENCODERZ0_INDEXOUT_not


Tim
 
The following user(s) said Thank You: meister

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

More
03 Jul 2025 18:13 #331175 by meister
Hi Tim,

sorry for that, is now fixed in 'main' branch
The following user(s) said Thank You: tommylight, Tim Bee

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

More
04 Jul 2025 12:00 #331227 by Happppppppy
Hi Meister,

I have setup a board file and config for the Terasic DECA max10 board and connected a W5500 module but it isn't showing up with the correct ip address.

I can confirm that the board is flashing (I'm using the quarts programmer to flash) as the LEDs change when I add or remove a bitout plugin.

The SPI clock and chip select looks right and signals are showing up on my scope on both mosi and miso lines (I don't have a digital decoder so can't interrogate the codes themselves).

The w5500 is showing up as a network device with what seems to be 5 default addresses (when I use arp -a in CMD)

Any thoughts on why the W5500 isn't configuring with the 192.168.10.194 address? I can share my board and config files and the compile output if that helps.

Thankyou!

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

More
04 Jul 2025 12:17 #331230 by meister
do have configure one of your network-interface to the 192.168.10.xxx range ?

please add you config and the output of:
ip a s
and
ip r s
 

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

More
04 Jul 2025 13:02 - 04 Jul 2025 13:14 #331232 by Happppppppy
Hi,

I don't have any devices configured with 192.168.10.xxx on the linuxcnc computer.

Here is the config:
{
"name": "BushmasterFPGA",
"description": "Terasic DECA Max10",
"boardcfg": "TerasicDECAMax10",
"protocol": "UDP",
"plugins": [
{
"type": "w5500",
"mac": "AA:AF:FA:CC:E3:1C",
"ip": "192.168.10.194",
"port": 2390,
"pins": {
"mosi": {
"pin": "Header Right:GPIO1_D0"
},
"miso": {
"pin": "Header Right:GPIO1_D1",
"pull": "down"
},
"sclk": {
"pin": "Header Right:GPIO1_D2"
},
"sel": {
"pin": "Header Right:GPIO1_D3"
},
"rst": {
"modifier": [
{
"type": "invert"
}
],
"pin": "Header Left:GPIO0_D4"
}
},
"uid": "w55000"
}
],
"linuxcnc": {
"ini": {
"EMC": {
"MACHINE": "BUSHMASTERFPGA"
},
"KINS": {
"JOINTS": 4,
"KINEMATICS": "trivkins coordinates=XYYZ kinstype=both"
},
"TRAJ": {
"COORDINATES": "X Y Y Z"
}
},
"machinetype": "mill"
}
}

Here are the outputs from the terminal:
cnc@BUSHMASTER-CNC:~$ ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether f8:0f:41:80:f0:e7 brd ff:ff:ff:ff:ff:ff
altname enp0s25
inet6 fe80::696b:7c3c:f7c9:4de2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
cnc@BUSHMASTER-CNC:~$ ip r s
cnc@BUSHMASTER-CNC:~$
Last edit: 04 Jul 2025 13:14 by Happppppppy.

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

More
04 Jul 2025 13:37 #331236 by Tim Bee
Dear meister:

Thanks for your repay and fix it,thanks again.


Tim

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

Time to create page: 0.125 seconds
Powered by Kunena Forum