Hello Guest it is June 14, 2025, 05:25:24 PM

Author Topic: CTB Driver input/output issues  (Read 5130 times)

0 Members and 1 Guest are viewing this topic.

CTB Driver input/output issues
« on: December 09, 2024, 04:24:33 AM »
Hello Guys

To give some background, I'm running kingstart rtx with mach4.
for the axis i'm running leadshine ELP-EC750Z and for the spindle I'm running CTB BKSC-44p5GHX with ethercat support.

The issues that I'm facing have to do with the CTB driver for which I've also included the documentation.

I want to activate a relay as soon as the servo driver is enabled, but I can’t seem to get it working.

I’ve connected the wires to T2 and T3 (as shown on page 2-14 of the manual, GHXB model).
I’m using output Q3, which is supposedly pre-configured for "servo enabling" by default. However, when I enable the servo in Mach4, I get no 24V signal on the Q3 output. Even when I turn on the spindle, Q3 remains "off."

Interestingly, when I change Hn.19 to 1 (Servo Ready), I immediately get 24V on Q3.
For this setup, I’m using pin 8 (Q3) and pin 12 (SC) from Port 2.

I've also made sure to verify that Hn19 = 0, Fn21 = 0 and A2.24 = 2
The A2.24 should be responsible for setting the driver to use the Q3 output as servo enabling as far as I understand.

So since this isn't working as expected I figured I would do it in a different way.
I confirmed I can trigger Q3 by setting the output as enabled from the system/mach4.
So the plan was to check whether the input for servo enabled is true in the system and if that's the case set the output to on.

When I went to check what input I should be using I enabled every single input value for the driver in mach4 to see which one would turn on when I enable the driver. But none of them actually change, so it seems that the inputs aren't working/coming in.

I've also included the xml configuration of the driver in the attachments and ethercat communication.

I'm hoping someone here can help me out

Offline cncmagic

*
  •  109 109
  • what me worry? heck...it ain't my machine anyway
Re: CTB Driver input/output issues
« Reply #1 on: December 10, 2024, 10:48:16 PM »
I'm not familiar with the Leadshine itself... have you configured the IO in Mach4? you need to enter the Control configuration and setup the IO links I'm guessing.  :o
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds
Re: CTB Driver input/output issues
« Reply #2 on: December 11, 2024, 05:24:27 AM »
Actually for the leadshines it's all working.
I'm using the leadshines for moving the axis and I have inputs working for min and max travel of each axis. as well as outputs for turning on the oil and coolant pumps.

The ctb driver however is having issues with showing anything on the inputs.

Offline smurph

*
  • *
  •  1,574 1,574
  • "That there... that's an RV."
Re: CTB Driver input/output issues
« Reply #3 on: December 28, 2024, 06:41:11 PM »
I would ask Kinstar.  It is going to be an EtherCAT compat issue.  Kingstar always rates highly every year with device compatibility at the EtherCAT "plugfest" every year.  But nobody is 100% on every device. 

Steve
Re: CTB Driver input/output issues
« Reply #4 on: January 07, 2025, 11:04:10 AM »
I would ask Kinstar.  It is going to be an EtherCAT compat issue.  Kingstar always rates highly every year with device compatibility at the EtherCAT "plugfest" every year.  But nobody is 100% on every device. 

Steve

Hi Steve,
I did indeed end up asking Kingstar, and they where kind enough to be on a 1 hour call with me regarding the issue where we checked out some of the settings and came to the conclusion that we can control the outputs just fine and that setting the output through the driver itself isn't the way to go.

What I'm trying to achieve is the following:
The AC spindle motor has a fan on it. Since the fan doesn't need to be on at all times (only when the driver of the motor is actually enabled), I only want the fan to turn on when we press the "enable" button on mach4.

I already have a output connected to the default "machine enabled" output in the mach4 configuration, this switches a relay that sends power to the oil pump.

So I have 2 options.
1. I wire in a 3 fase relay to the same output the oil pump is on to turn on and off the 3 phase fan that is connected to the AC spindle motor
2. I wire in a 3 fase relay to it's own output and I write a script so I can use 2 output's when the enable button is pressed.

Right now I've opted to go for option 2. What I did now is use a PMC script for this, which works.
But I'm wondering if this is the best solution.
Can't I execute the script on the button press instead of setting it as a PMC script which (from what I've read) is checked every 10 ms

Offline cncmagic

*
  •  109 109
  • what me worry? heck...it ain't my machine anyway
Re: CTB Driver input/output issues
« Reply #5 on: January 07, 2025, 05:22:57 PM »
you can easily write some code to turn on/off an output inside the button press itself.. let me know if you need a sample :o
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds

Offline smurph

*
  • *
  •  1,574 1,574
  • "That there... that's an RV."
Re: CTB Driver input/output issues
« Reply #6 on: January 07, 2025, 11:18:16 PM »
I would ask Kinstar.  It is going to be an EtherCAT compat issue.  Kingstar always rates highly every year with device compatibility at the EtherCAT "plugfest" every year.  But nobody is 100% on every device. 

Steve
So I have 2 options.
1. I wire in a 3 fase relay to the same output the oil pump is on to turn on and off the 3 phase fan that is connected to the AC spindle motor
2. I wire in a 3 fase relay to it's own output and I write a script so I can use 2 output's when the enable button is pressed.

Right now I've opted to go for option 2. What I did now is use a PMC script for this, which works.
But I'm wondering if this is the best solution.

I would use the PMC route.  So your first instinct was correct, IMHO.  It is easier to tie things together in the PMC.  The button scripts are fine but are you always using a button?  M3/M4 would turn on the spindle and M5 turns off the spindle you could tie the spindle fan relay output to the SPINDLE_RUNNING signal. 

Steve