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

More
1 year 8 months ago #320771 by meister
Works for me :)
www.youtube.com/shorts/ZcQjW4829R0

the modbus has some delay, thats why it is a little asynchronous
Code:
M64 P0 G4 P0.1 M64 P1 G4 P0.1 M64 P2 G4 P0.1 ... M65 P1 G4 P0.1 M65 P2 G4 P0.1 M65 P3 ...


@Andrew
there is also a template now for your board, but without input yet, would be nice if you can give me your config for the inputs

Please Log in to join the conversation.

More
1 year 8 months ago #320891 by babinda01
Hi Olli
Thank you once again for your prompt response to my issue.
I have done a very quick test and at the moment I am over the moon, all the outputs work as they should.
I am using your template for N4D3E16, with exactly your settings.
When I use LinuxCNC it works perfectly, but if I use the test-gui in riocore the outputs work, but i get the following errors in the terminal window.

loading board setup: Tangbob
connection via: UDP
IP: 192.168.10.194
PORT: 2390
WARNING: can not set timeouts: timed out
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 457, resource id: 11699426, major code: 40 (TranslateCoords), minor code: 0
ERROR: modbus CSUM failed [173, 219] != [136, 17]
ERROR: modbus CSUM failed [92, 27] != [136, 17]
ERROR: modbus CSUM failed [92, 27] != [136, 17]
ERROR: modbus CSUM failed [173, 219] != [136, 17]
ERROR: modbus CSUM failed [60, 136] != [1, 225]
ERROR: modbus CSUM failed [108, 27] != [73, 209]
ERROR: modbus CSUM failed [173, 219] != [136, 17]


I will test for a little while longer to see if I can figure out if I have configured something incorrectly.

To use the inputs originally I used the following settings. I cant remember why I broke them into lots of 4, I'm thinking that if I put a "values" as 16 it wouldn't work

"inputs1_4": {
"address": 1,
"type": 3,
"register": 129,
"values": 4,
"is_float": false,
"scale": 1.0,
"unit": "",
"error_values": "",
"format": "d",
"timeout": 100,
"delay": 60,
"direction": "input"
},
"inputs5_8": {
"address": 1,
"type": 3,
"register": 133,
"values": 4,
"is_float": false,
"scale": 1.0,
"unit": "",
"error_values": "",
"format": "d",
"timeout": 100,
"delay": 60,
"direction": "input"
},
"inputs9_12": {
"address": 1,
"type": 3,
"register": 137,
"values": 4,
"is_float": false,
"scale": 1.0,
"unit": "",
"error_values": "",
"format": "d",
"timeout": 100,
"delay": 60,
"direction": "input"
},
"inputs13_16": {
"address": 1,
"type": 3,
"register": 140,
"values": 4,
"is_float": false,
"scale": 1.0,
"unit": "",
"error_values": "",
"format": "d",
"timeout": 100,
"delay": 60,
"direction": "input"
}
},


Thanks again.

Andrew

Please Log in to join the conversation.

More
1 year 8 months ago #320902 by babinda01
Hi
Please ignore the last post.......The test-gui isn't so happy with the idea of modbus, but I have all 16 ins and 16 outs using the N4D3E16 working under Linuxcnc!!!!

Very Happy.

Thank you again Olli for such a great system.

Attached is my .json file for reference. This file has only really been used for configuring modbus, at this stage. Tomorrow I will try and configure it for using 2 modbus cards on separate addresses.

Regards

Andrew

 

Attachment not found

Please Log in to join the conversation.

More
1 year 8 months ago #321145 by meister
i have released a new version (dev->main),

but remember, never change a running system :)

If you update you also have to rebuild the gateware.

if you use i2c devices you probably have to change your config, it no longer runs individually but really as a bus (or several).

github.com/multigcs/riocore/blob/main/CHANGELOG.md

Please Log in to join the conversation.

More
1 year 8 months ago #321182 by meister
# Installer-Script (debian-bookworm only)

if you have a Debian-Bookworm installation (e.g. from the LinuxCNC ISO or the LinuxCNC raspberry image) you can simply use this script to install all depends and the icestorm and gowin toolchain (gowin only on Intel/AMD)

wget -O- www.multixmedia.org/riocore-installer.sh | bash

Please Log in to join the conversation.

More
More
1 year 8 months ago #321583 by meister
i found a bug in the avg call (wrong place)

if you use an avg filter and have problems with strange spikes, you should update :(


fixed in master and dev

Please Log in to join the conversation.

More
1 year 8 months ago #322249 by epineh
  I have managed to get one of my mill servos running on the bench, running closed loop to Linuxcnc via a Tang Nano, works very well, now waiting for PCB's to properly retrofit the mill. Thanks Olli for your awesome work.
 

Attachment not found

Please Log in to join the conversation.

More
1 year 7 months ago #323123 by kzali
I have LCNC version 2.9.4 on a core i5. I used the Installer-Script the script all went well smoothly.
I connected my Tangobob and the China 5 axis BOB and used the deafault config for the setup Gui. Found the GUI to be very intuitive. However after Generate and Compile when I try the Flash button, I get the following error:

openFPGALoader -b tangnano9k impl/pnr/project.fs -f
make: openFPGALoader: No such file or directory
make: *** [Makefile:41: load] Error 127

Also is there any DB25 pin mapping or schematic of the China 5 axis BOB available to customize the config, or am I missing something?

Any help will be much appreciated

Thanks

Please Log in to join the conversation.

More
1 year 7 months ago #323127 by meister
Thanks for testing :)

ohh, i forgot a package in the installer:
Code:
apt-get install openfpgaloader

the BOB is added as module in the sample config, you can convert/split this into single plugins:
 

Attachment not found



The pins on the left and right connector are named P1->P17,
like on the DB26 connectors:
 

Attachment not found



hope that helps.





 

Please Log in to join the conversation.

Time to create page: 3.811 seconds
Powered by Kunena Forum