Remora - ethernet NVEM cnc board

More
18 Apr 2023 16:39 - 18 Apr 2023 16:47 #269376 by meister
ok, since I have been wrong before,
I have tested it again



Turn audio on !
You must hear the different

first two moves with original firmware
then two moves with my changes

has anyone ever tested the firmware on a real CNC, not just with free-running motors.
Does anyone want to make a comparison with my changes ?
or have I configured something wrong ?

my ini:
[EMC]
MACHINE = mikro5x
DEBUG = 0
VERSION = 1.1

[DISPLAY]
GLADEVCP = mikro5x.ui
DISPLAY = axis
CYCLE_TIME = 0.100
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
MAX_FEED_OVERRIDE = 10
MAX_SPINDLE_OVERRIDE = 1.0
DEFAULT_LINEAR_VELOCITY = 1200.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 1200.00
DEFAULT_ANGULAR_VELOCITY = 36.00
MIN_ANGULAR_VELOCITY = 0
MAX_ANGULAR_VELOCITY = 45.00
PROGRAM_PREFIX = ~/linuxcnc/nc_files
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 2
INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm

DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 20.0
DEFAULT_ANGULAR_VELOCITY = 20.0
MAX_ANGULAR_VELOCITY = 60

[KINS]
JOINTS = 5
#JOINTS = 4
KINEMATICS =trivkins coordinates=XYZAC
#KINEMATICS =trivkins coordinates=XYZA

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = ~/linuxcnc/subroutines
USER_M_PATH = ~/linuxcnc/m_codes
REMAP = M600 modalgroup=6 argspec=T ngc=toolchange

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 0
SERVO_PERIOD = 1000000

[HAL]
HALFILE = mikro5x.hal
POSTGUI_HALFILE = postgui_call_list.hal
HALUI = halui

[HALUI]
MDI_COMMAND = o<spindle_toggle> call
MDI_COMMAND = o<clamp_toggle> call

[TRAJ]
COORDINATES = X Y Z A C
#COORDINATES = X Y Z A
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 1200.00
MAX_LINEAR_VELOCITY = 1200.00
NO_FORCE_HOMING = 1

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY = 20.0
MAX_ACCELERATION = 500.0
MIN_LIMIT = -150
MAX_LIMIT = 150

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -200.0
MAX_LIMIT = 150.0
MAX_VELOCITY = 20.0
MAX_ACCELERATION = 500.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 1600.0
FERROR = 1.0
MIN_FERROR = 0.5
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 3.0
HOME_FINAL_VEL = -20
HOME_IGNORE_LIMITS = YES
HOME_USE_INDEX = NO
HOME_OFFSET = 6.5
HOME = 0.0
HOME_SEQUENCE = 3
.....

my hal:
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt remora-nv

net spindle-enable spindle.0.on => remora.output.01
net digital-out-0 motion.digital-out-00 => remora.output.00
net autotc1 iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net autotc2 iocontrol.0.tool-change => iocontrol.0.tool-changed
net toolprobe <= remora.input.05.not
net toolprobe => motion.probe-input
net slotprobe2 <= remora.input.12
net slotprobe3 <= remora.input.13
net slotprobe4 <= remora.input.14

net user-enable-out <= iocontrol.0.user-enable-out => remora.enable
net user-request-enable <= iocontrol.0.user-request-enable => remora.reset
net remora-status <= remora.status => iocontrol.0.emc-enable-in

addf remora.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf remora.update-freq servo-thread
addf remora.write servo-thread


# joint 0 setup (X axis)
setp remora.joint.0.scale [JOINT_0]SCALE
setp remora.joint.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL

net j0pos-cmd joint.0.motor-pos-cmd => remora.joint.0.pos-cmd
net j0pos-fb remora.joint.0.pos-fb => joint.0.motor-pos-fb
net j0enable joint.0.amp-enable-out => remora.joint.0.enable

net home-x <= remora.input.06
net home-x => joint.0.home-sw-in
.....


Thanks,
Olli

EDIT: the firmware-file for testing: github.com/multigcs/Remora-RT1052/tree/l...jitter_test/firmware
 
Last edit: 18 Apr 2023 16:47 by meister.

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

More
18 Apr 2023 22:52 #269387 by scotta

Hi Scott

I have done some further testing of the new firmware (remora-rt1052-NVEM-0.0.2.bin ) & have found that the various input pins in the MPG area are now not working (that used to work before)
Attached is a list of input pins that were working but are now not working. (written in no particular order)

I have flashed remora-rt1052-0.0.1.bin back into the box & can confirm this.

I was using one of these inputs as an Estop (as per the pic.

Thanks
Alex

Alex, my bad. When adding the new defines for the NVEM, I neglected to update the code in servoThread.c . Should be good now. Sorry

github.com/scottalford75/Remora-RT1052/b...t1052-NVEM-0.2.1.bin

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

More
18 Apr 2023 23:10 #269388 by scotta

Hi Scott, is this working with the new version of the EC500?

Yes, but the MPG inputs are currently not available. Working on it.
The following user(s) said Thank You: Cold Turkey, Murphy

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

More
18 Apr 2023 23:23 #269389 by scotta

ok, since I have been wrong before,
I have tested it again



Turn audio on !
You must hear the different

first two moves with original firmware
then two moves with my changes

has anyone ever tested the firmware on a real CNC, not just with free-running motors.
Does anyone want to make a comparison with my changes ?
or have I configured something wrong ?

my ini:
[EMC]
MACHINE = mikro5x
DEBUG = 0
VERSION = 1.1

[DISPLAY]
GLADEVCP = mikro5x.ui
DISPLAY = axis
CYCLE_TIME = 0.100
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
MAX_FEED_OVERRIDE = 10
MAX_SPINDLE_OVERRIDE = 1.0
DEFAULT_LINEAR_VELOCITY = 1200.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 1200.00
DEFAULT_ANGULAR_VELOCITY = 36.00
MIN_ANGULAR_VELOCITY = 0
MAX_ANGULAR_VELOCITY = 45.00
PROGRAM_PREFIX = ~/linuxcnc/nc_files
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 2
INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm

DEFAULT_LINEAR_VELOCITY = 0.2
MAX_LINEAR_VELOCITY = 20.0
DEFAULT_ANGULAR_VELOCITY = 20.0
MAX_ANGULAR_VELOCITY = 60

[KINS]
JOINTS = 5
#JOINTS = 4
KINEMATICS =trivkins coordinates=XYZAC
#KINEMATICS =trivkins coordinates=XYZA

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = ~/linuxcnc/subroutines
USER_M_PATH = ~/linuxcnc/m_codes
REMAP = M600 modalgroup=6 argspec=T ngc=toolchange

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 0
SERVO_PERIOD = 1000000

[HAL]
HALFILE = mikro5x.hal
POSTGUI_HALFILE = postgui_call_list.hal
HALUI = halui

[HALUI]
MDI_COMMAND = o<spindle_toggle> call
MDI_COMMAND = o<clamp_toggle> call

[TRAJ]
COORDINATES = X Y Z A C
#COORDINATES = X Y Z A
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 1200.00
MAX_LINEAR_VELOCITY = 1200.00
NO_FORCE_HOMING = 1

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

[AXIS_X]
MAX_VELOCITY = 20.0
MAX_ACCELERATION = 500.0
MIN_LIMIT = -150
MAX_LIMIT = 150

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -200.0
MAX_LIMIT = 150.0
MAX_VELOCITY = 20.0
MAX_ACCELERATION = 500.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 1600.0
FERROR = 1.0
MIN_FERROR = 0.5
HOME_SEARCH_VEL = 20.0
HOME_LATCH_VEL = 3.0
HOME_FINAL_VEL = -20
HOME_IGNORE_LIMITS = YES
HOME_USE_INDEX = NO
HOME_OFFSET = 6.5
HOME = 0.0
HOME_SEQUENCE = 3
.....

my hal:
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt remora-nv

net spindle-enable spindle.0.on => remora.output.01
net digital-out-0 motion.digital-out-00 => remora.output.00
net autotc1 iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net autotc2 iocontrol.0.tool-change => iocontrol.0.tool-changed
net toolprobe <= remora.input.05.not
net toolprobe => motion.probe-input
net slotprobe2 <= remora.input.12
net slotprobe3 <= remora.input.13
net slotprobe4 <= remora.input.14

net user-enable-out <= iocontrol.0.user-enable-out => remora.enable
net user-request-enable <= iocontrol.0.user-request-enable => remora.reset
net remora-status <= remora.status => iocontrol.0.emc-enable-in

addf remora.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf remora.update-freq servo-thread
addf remora.write servo-thread


# joint 0 setup (X axis)
setp remora.joint.0.scale [JOINT_0]SCALE
setp remora.joint.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL

net j0pos-cmd joint.0.motor-pos-cmd => remora.joint.0.pos-cmd
net j0pos-fb remora.joint.0.pos-fb => joint.0.motor-pos-fb
net j0enable joint.0.amp-enable-out => remora.joint.0.enable

net home-x <= remora.input.06
net home-x => joint.0.home-sw-in
.....


Thanks,
Olli

EDIT: the firmware-file for testing: github.com/multigcs/Remora-RT1052/tree/l...jitter_test/firmware

 

Thanks for sharing the latest video, interesting indeed. I'm curious.

I note that in your repo, you have set the#define PRU_BASEFREQ 60000Did you change the corresponding line in remora-nv.h when you used halcompile to install the LinuxCNC component? If not the frequency command calculations will be out with the firmware creating steps 1.5 times faster than LinuxCNC is expecting. On the next servo period the control loop would have to drop the frequency back to compensate for the additional steps. 

Without changing servo or base frequencies in the original source code and adding your double buffer, does the "jitter" go away?

I'm intrigued as my machines running Remora are smooth as. And definitely would show up in print quality.

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

More
19 Apr 2023 07:12 #269406 by meister
i will test it later, but the change in remora-nv.h is not the Problem, it was set to 40000 at my firsts tests.

Is you printer running with a rt1052 board ? with closed loop drivers or normal one ?

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

More
19 Apr 2023 17:25 - 19 Apr 2023 19:49 #269431 by palain
I have an nvem V2 with linuxcnc v2.84 on debian 10.
this is on a PC
I set the PC governer to max clock speed and isolcpu.
Latency on the base thread is rather good +- 12000.
reducing servo_thread to 500000 had no effect

Machine configuration is xxyz

network cards are both realtek but problems with drivers were not mentioned in debian 10

followed the video - first moves etc.
I keep getting sporatic following errors. 
All joints do work.
I was under the impression that those had been taken care of.  How to fix that.
do I need another PC or single board?  Do I give up on the NVEM?  I am somewhat frustrated that the thread was started with an nvem v2 and now it is filled with new information on the new nvem with unresolved issues on the v2

Any help would be appreciated.
 
Last edit: 19 Apr 2023 19:49 by palain. Reason: added details about machine

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

More
19 Apr 2023 17:27 #269432 by meister
so, changing PRU_BASEFREQ do not help.

Here you can get the diffs for the 'double_buffer' version (incl. .bin):

github.com/multigcs/Remora-RT1052/tree/double_buffer

it sounds a little bit better but, em, no, not what i want.

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

More
19 Apr 2023 18:12 #269439 by Teos81
@ PalainI had the same problem.
A have tuned the mainboard setting, slowed down a little bit the fast movements and changed from 1000000 to 500000 the servo_period. Only after the period change, the error stop.

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

More
19 Apr 2023 18:26 #269441 by royka
@palain That's not a lot of information you've given.
For how long did run the latency test? Did open various things in the meantime? What's the brand of your network adapter? When does it happen? What is your config? For what type of machine are you using it?
You're talking about a main thread, I guess you mean the base thread which you don't need with Remora and 12000 of what?

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

More
19 Apr 2023 19:41 - 20 Apr 2023 07:43 #269451 by meister
motto of the day: break the rules and push the limits :)

I optimized some more things in my branch and now I'm here:
#define PRU_BASEFREQ 120000

and it works .
ok, i must do some more test but it look very good
 
Last edit: 20 Apr 2023 07:43 by meister.

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

Time to create page: 0.279 seconds
Powered by Kunena Forum