Advanced Search

Search Results (Searched for: )

  • ShemJ
  • ShemJ's Avatar
  • Hakan
  • Hakan
30 Sep 2025 09:18

Leadshine 2CS3E-D507 / Cia402 almost working - help please!

Category: EtherCAT

You need those two motion-command controller statements, they should go in between the cia402.read-all and write-all as in the example file.
It won't move without those.

It was just an example to show how it is normally done.
You can set the pos-cmd in halshow, try that.
The two drives are distinguished by the variable name srv-2-var srv-1-var etc.
 
  • jrc
  • jrc
30 Sep 2025 08:03

Leadshine 2CS3E-D507 / Cia402 almost working - help please!

Category: EtherCAT

Many thanks for your quick reply.
My hal file looks like this:
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
loadrt cia402 count=2

addf lcec.read-all            servo-thread
addf cia402.0.read-all        servo-thread
addf cia402.1.read-all        servo-thread
addf cia402.0.write-all       servo-thread
addf cia402.1.write-all       servo-thread
addf lcec.write-all           servo-thread

#*******************
#  Right Carousel  lcec.0.0 arm (r1) cia402.0 joint.3 platter (r2) cia402.1 joint.4
#*******************
## Carousel arm ##
setp cia402.0.enable 1
#setp cia402.0.opmode 1
setp cia402.0.csp-mode 1
setp cia402.0.pos-scale 4000

# ethercat to cia402 driver
net r1-statusword      lcec.0.0.srv-1-cia-statusword  => cia402.0.statusword
net r1-opmode-display  lcec.0.0.srv-1-opmode-display  => cia402.0.opmode-display
net r1-drv-act-pos     lcec.0.0.srv-1-actual-position => cia402.0.drv-actual-position
net r1-drv-act-vel     lcec.0.0.srv-1-actual-velocity => cia402.0.drv-actual-velocity

# cia402 driver to ethercat
net r1-controlword         cia402.0.controlword         => lcec.0.0.srv-1-cia-controlword
net r1-modes-of-operation  cia402.0.opmode              => lcec.0.0.srv-1-opmode
net r1-drv-target-pos      cia402.0.drv-target-position => lcec.0.0.srv-1-target-position

## Carousel Platter ##
setp cia402.1.enable 1
setp cia402.1.csp-mode 1
setp cia402.1.pos-scale 4000

# ethercat to cia402 driver
net r2-statusword      lcec.0.0.srv-2-cia-statusword  => cia402.1.statusword
net r2-opmode-display  lcec.0.0.srv-2-opmode-display  => cia402.1.opmode-display
net r2-drv-act-pos     lcec.0.0.srv-2-actual-position => cia402.1.drv-actual-position
net r2-drv-act-vel     lcec.0.0.srv-2-actual-velocity => cia402.1.drv-actual-velocity

# cia402 driver to ethercat
net r2-controlword         cia402.1.controlword         => lcec.0.0.srv-2-cia-controlword
net r2-modes-of-operation  cia402.1.opmode              => lcec.0.0.srv-2-opmode
net r2-drv-target-pos      cia402.1.drv-target-position => lcec.0.0.srv-2-target-position

The missing part relative to the example you give me from dbraun is: 
addf motion-command-handler servo-thread
addf motion-controller servo-thread

#from motion to cia
net r1-enable    <= joint.3.amp-enable-out => cia402.0.enable
net r1-amp-fault => joint.3.amp-fault-in   <= cia402.0.drv-fault
net r1-pos-cmd   <= joint.3.motor-pos-cmd  => cia402.0.pos-cmd
net r1-pos-fb    => joint.3.motor-pos-fb   <= cia402.0.pos-fb

net r2-enable    <= joint.4.amp-enable-out => cia402.1.enable
net r2-amp-fault => joint.4.amp-fault-in   <= cia402.1.drv-fault
net r2-pos-cmd   <= joint.4.motor-pos-cmd  => cia402.1.pos-cmd
net r2-pos-fb    => joint.4.motor-pos-fb   <= cia402.1.pos-fb

If I add that into my hal file , LinuxCNC fails to start and complains about being unable to execute certain SDO uploads:
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6502:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6060:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x607a:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6d02:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6860:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x687a:0x00, error -22, abort_code 00000000)
HAL: ERROR: function 'motion-command-handler' may only be added to one thread
./2CS3E_D507.hal:12: addf failed

The last item in the list about the motion-command-handler suggests that this is duplicating another one in the standard config. If I comment out the motion-command-handler and motion-controller lines of the dbraun additions., that message goes away but it still crashes on startup with a similar list of SDO complaints and a new one about being unable to add a pin:
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6502:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6060:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x607a:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6d02:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x6860:0x00, error -22, abort_code 00000000)
Failed to execute SDO upload: Invalid argument
LCEC: slave 0.1: Failed to execute SDO upload (0x687a:0x00, error -22, abort_code 00000000)
./2CS3E_D507.hal:36: Pin 'joint.3.amp-enable-out' does not exist
43420
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

@Hakan - Any further suggestions? Am I doing something dumb like omitting some essential pin definition, or ir is possible that the cia402 mappings are somehow not working for a dual-stepper drive for some reason?

@scottlaird  - do you have a simple hal file that works for a 2CS3E-D507 and actually gets both closed-loop steppers to move? Ideally in pp mode if possible, but at a push CSP would also work with the risk of more complexity, which is not needed for a toolchanger.
 
  • Hakan
  • Hakan
30 Sep 2025 07:57 - 30 Sep 2025 07:59

(Solved) Initialization code for a rintelligent ECT60 fails when run on an ECR60

Category: Driver Boards

It's the Twincat XAE to download.
You also tried to reset to factory defaults?
Also doing "ethercat rescan" won't hurt, might help.
  • Hakan
  • Hakan
30 Sep 2025 07:55
Replied by Hakan on topic Trouble with Cia402 drive configuration

Trouble with Cia402 drive configuration

Category: EtherCAT

Well, you can try with that as your ethercat-conf.xml
  • Hakan
  • Hakan
30 Sep 2025 07:52

can't pass a home-mode negative number to ethercat drive with setp in HAL file

Category: HAL

Does home-mode have halType="u32" in ethercat-conf.xml? Try changing to "s32".
  • ArcAiN6
  • ArcAiN6's Avatar
30 Sep 2025 06:48

Looking for a specific, detailed howto guide for XYYZ gantry setup

Category: Advanced Configuration

This is as close as i've gottent to getting it to home to where i want it... the problem however, is it keeps throwing an error :

Exceeded NEGATIVE soft limit (0.000000) on joint 2
Hint: switch to joint mode to jog off soft limit

Here's the current INI: 
 

File Attachment:

File Name: my-mill_20...9-30.ini
File Size:3 KB


Thank you for helping :)
  • ffffrf
  • ffffrf
30 Sep 2025 03:40

Extremely confused - Nonworking limit switches

Category: General LinuxCNC Questions

*in both cases the switch is clearly working in pncconf


- I am totally stumped - i guess it could be a bad version of linuxcnc? I havent had any issues with it since setting it up for the first time, only now with this second mesa board. You recommend I update linuxcnc? Will try to do so tomorrow morning
  • ArcAiN6
  • ArcAiN6's Avatar
30 Sep 2025 03:09

Looking for a specific, detailed howto guide for XYYZ gantry setup

Category: Advanced Configuration

Yea... I'm kind of struggling to wrap my head around the home, softlimit, offset, limit switch envelope... It seems like everything i try might actually be wrong. I'm either traveling the wrong direction, or, triggering hard limits, or soft limits, or the displayed location isn't where the actual toolhead is. 


 
  • PCW
  • PCW's Avatar
30 Sep 2025 02:53

Extremely confused - Nonworking limit switches

Category: General LinuxCNC Questions

Is it possible you have a bad version of LinuxCNC?

(since it seems to be a quite old version when master was 2.9)

but in BOTH cases, the limit switch is shown working in halmeter of pncconf

Did you mean halmeter or pncconf?
  • ffffrf
  • ffffrf
30 Sep 2025 01:48 - 30 Sep 2025 02:34

Extremely confused - Nonworking limit switches

Category: General LinuxCNC Questions

Hey, so the gpio difference was from when i was debugging, after pncconf, both show the same input-00 pin (most recently i tried wiring it to input-01 to see if any difference would occur so this file snippet shows input 01, but again has not fixed it

- the mesa boards were both originally 10.10.10.10 (via IP in terminal and via hal/INI and in PNCCONF) same issue persisted, even after trying all sorts of gpio input changes, reboots, etc. I only changed one to 10.10.10.11 to see if it would resolve the issue

yes sorry your last post came in when i was writing the above - it is unfortunately the same, I just accidentally sent the config in the middle of trying to debug by changing it to gpio001 or gpio000


edit: i will go back now and put mesa2 as 10.10.10.10 as it originally was so i can start debug from square 1


edit2: I feel like when i look back at everything ive tried, the following thing seems to be pointing to wher something is going wrong (below)

back when all boards were 10.10.10.10, all pnc confs for both machines were the same, all inputs were the same for limit switches, etc and i had not changed anything, the following would occur:

mesa2 running config1 (for machine1) WOULD show the limit switches working in axis GUI under the watch section of hal config, however, when I closed config1, and instead ran config2 (for machine2), suddenly the EXACT SAME PINS would NOT show a status change when I press on the limit switch while watching in hal configuration tab of axis gui

but in BOTH cases, the limit switch is shown working in halmeter of pncconf

edit3: I just reverted mesa2 back to 10.10.10.10 and I am able to recreate the above issue, and again the issue persists. I am able to open config1 on mesa2 and I see in the halconfig the status of my input-01 pin changing, but when i close it and open up config2, it no longer works. I also juist tried literally copy pasting the initial HAL file portion over to machine1 config hal (taig), minus the spindle components which I deleted, and the same issue persists and is recreated!!!

edit4: I know everyone is probably asleep but I wanted to post one more thing that I think might be helpful. I just did something crazy - I went into pncconf for config1, which was a lathe, and had a working limit switch with my mesa 2 board about 10 seconds ago. I went into this pncconf config1, and changed it to an XYZ mill, and had to change the X axis to stepgen 3 but left everything else alone...now when I ran this, the limit switch DOES NOT WORK
  • tommylight
  • tommylight's Avatar
30 Sep 2025 01:45
Replied by tommylight on topic Extremely confused - Nonworking limit switches

Extremely confused - Nonworking limit switches

Category: General LinuxCNC Questions

Can i assume you missed my last post? :)
Also, the Mesa IP is 10.10.10.11 on one of those hal files, should be 10.10.10.10 on both files.
  • ffffrf
  • ffffrf
30 Sep 2025 01:40

Extremely confused - Nonworking limit switches

Category: General LinuxCNC Questions

Your assumptions are all correct

and yes aware I cannot run two instances of linuxcnc at the same time, I only ever run one of them, and only one mesa is ever connected to the same pc.

I am looking at both of the hal/ini of both machines and there is no obvious changes within the starting portions of the hal file, and I also built pncconf of my second machine based on my settings of the first machine and just confirmed most of it is identical (minus one being a lathe and one being a cnc mill)
  • tommylight
  • tommylight's Avatar
30 Sep 2025 01:35
Replied by tommylight on topic Extremely confused - Nonworking limit switches

Extremely confused - Nonworking limit switches

Category: General LinuxCNC Questions

Ok i just saw the attachments,
this is on Taig new
net min-x <= hm2_7i96s.0.gpio.001.in
while this is on Modlathe
net min-home-x <= hm2_7i96s.0.inm.00.input-00-not
not the same pins, and i do not mean the number, probably choosing the pins on the wrong page of the wizard ???
Damn, i am making a lot of assumptions tonight, i better go sleep, it is 3:33AM here! :)
  • tommylight
  • tommylight's Avatar
30 Sep 2025 01:27
Replied by tommylight on topic Extremely confused - Nonworking limit switches

Extremely confused - Nonworking limit switches

Category: General LinuxCNC Questions

@LangdonS, he has 2 of Mesa 7i96S, so why are you suggesting he use parallel port testers?
Not helpful, just confusing.
-
@ffffrf
trying to clear things a bit, so you have
1 single PC
2 of Mesa 7i96S
2 of separate machines
Is that correct? Assuming yes
From that, PC works properly with Mesa1, machine works properly with Mesa1, correct? Assuming yes
That same PC with the Mesa 2 works for steppers but IO does not work, right? Assuming yes
-
Do you need to run both Mesa/machines at the same time? Assuming no
I am pretty sure 2 Mesa can be run, but not two instances of LinuxCNC, although there was some talk about that.
-
Assuming all of the above is correct:
-There is no need to change Mesa board address, nor change PC address at all to use both cards, but not at the same time. Leave the PC at 10.10.10.11 and both Mesa at 10.10.10.10. That reminds me, the networking on your PC is not set correctly despite working intermittently as it has two different names assigned to the same interface, and this must be corrected for reliable connection.
-regarding non working IO, i suspect you might have changed the serial ports on the PncConf wizard, but again, this is my assumption and as such might be wrong.
-easiest way = make a new config, do not change serial ports numbers, see if that works
or
-open both hal files, for Mesa1 and Mesa2 with a text editor (do not use office stuff) and check the "loadrt" lines at the top of the files, see if they are the same and if the sserial string is the same
-
Just in case, you can make as many config as you like, you can have several configs for the same machine with say different speeds or different accelerations or different limits or.... so feel free to make new configs till you get things working as you like them to.
Wow this was long.... :)
Displaying 4051 - 4065 out of 21883 results.
Time to create page: 0.459 seconds
Powered by Kunena Forum