- Posts: 806
- Thank you received: 502
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
- meister
- Offline
- Platinum Member
-
Less
More
2 months 2 weeks ago #348685
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
All my positive terminals are connected to the purple cable via a thin wire.
Dirhold isn’t the problem; it really is the voltage that’s coming through – there was a clear difference between 3.3V and 5V.
My connections are like in your image, but with EN connected.
You could use a multimeter to check what voltage is coming through your DIR pin.
Dirhold isn’t the problem; it really is the voltage that’s coming through – there was a clear difference between 3.3V and 5V.
My connections are like in your image, but with EN connected.
You could use a multimeter to check what voltage is coming through your DIR pin.
Please Log in or Create an account to join the conversation.
- viewsat
- Offline
- Junior Member
-
Less
More
- Posts: 33
- Thank you received: 10
2 months 2 weeks ago - 2 months 1 week ago #348686
by viewsat
Replied by viewsat on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
DIR/PULSE issue resolved, thank you!! (2026-08-19)
Hi tuxcnc
I tried increasing the dirhold (PULSE=10, DIR=25) but it still didn't return to the origin correctly. When using a stepper motor, I pay attention to the Sequence Chart of Control Signals. If I use a Leadshine DM542 uses HCPL-063L/15MB high-speed optocouplers for both the DIR and Pulse inputs, so there are no problems using it.
Because increasing the dirHOLD time should have solved the problem, but it didn't. If Riocore hadn't fixed the DIR issue with the cheap DM542 driver mentioned earlier, I could only replace the pc817 with a 6N137. However, I still really hope that Meister will pay attention to this problem.
Hi tuxcnc
I tried increasing the dirhold (PULSE=10, DIR=25) but it still didn't return to the origin correctly. When using a stepper motor, I pay attention to the Sequence Chart of Control Signals. If I use a Leadshine DM542 uses HCPL-063L/15MB high-speed optocouplers for both the DIR and Pulse inputs, so there are no problems using it.
Because increasing the dirHOLD time should have solved the problem, but it didn't. If Riocore hadn't fixed the DIR issue with the cheap DM542 driver mentioned earlier, I could only replace the pc817 with a 6N137. However, I still really hope that Meister will pay attention to this problem.
Last edit: 2 months 1 week ago by viewsat.
Please Log in or Create an account to join the conversation.
- viewsat
- Offline
- Junior Member
-
Less
More
- Posts: 33
- Thank you received: 10
2 months 2 weeks ago - 2 months 1 week ago #348687
by viewsat
Replied by viewsat on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
DIR/PULSE issue resolved, thank you!! (2026-08-19)
Last edit: 2 months 1 week ago by viewsat.
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 806
- Thank you received: 502
2 months 2 weeks ago - 2 months 2 weeks ago #348688
by meister
You can check that Dirhold is working using Testbench and by monitoring it on an oscilloscope or logic analyser.
It worked for me with the default settings, but it’s certainly better to set it to the manufacturer’s specifications to be on the safe side.
(cd riocore/plugins/stepdir/ ; make)
In my tests, the problem only occurred at 3.3V;
if you Google ‘DM542 problem’, you’ll find lots of reports of the same issue.[/quote]
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
All my positive terminals are connected to the purple cable via a thin wire.
Dirhold isn’t the problem; it really is the voltage that’s coming through – there was a clear difference between 3.3V and 5V.
My connections are like in your image, but with EN connected.
You could use a multimeter to check what voltage is coming through your DIR pin.
I suspect that when the DIR signal starts acting, it might not follow the set dirhold wait time, outputting PULSE before the process is complete. When encountering a motor driver with a slow dirhold response, this results in an invalid PULSE output. It's strange that increasing the dirhold value doesn't solve the problem; this is a problem I don't understand.
You can check that Dirhold is working using Testbench and by monitoring it on an oscilloscope or logic analyser.
It worked for me with the default settings, but it’s certainly better to set it to the manufacturer’s specifications to be on the safe side.
(cd riocore/plugins/stepdir/ ; make)
In my tests, the problem only occurred at 3.3V;
if you Google ‘DM542 problem’, you’ll find lots of reports of the same issue.[/quote]
Last edit: 2 months 2 weeks ago by meister.
The following user(s) said Thank You: viewsat
Please Log in or Create an account to join the conversation.
- viewsat
- Offline
- Junior Member
-
Less
More
- Posts: 33
- Thank you received: 10
2 months 2 weeks ago - 2 months 1 week ago #348690
by viewsat
Replied by viewsat on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
DIR/PULSE issue resolved, thank you!! (2026-08-19)
All my positive terminals are connected to the purple cable via a thin wire.
Dirhold isn’t the problem; it really is the voltage that’s coming through – there was a clear difference between 3.3V and 5V.
My connections are like in your image, but with EN connected.
You could use a multimeter to check what voltage is coming through your DIR pin.
I suspect that when the DIR signal starts acting, it might not follow the set dirhold wait time, outputting PULSE before the process is complete. When encountering a motor driver with a slow dirhold response, this results in an invalid PULSE output. It's strange that increasing the dirhold value doesn't solve the problem; this is a problem I don't understand.
You can check that Dirhold is working using Testbench and by monitoring it on an oscilloscope or logic analyser.
It worked for me with the default settings, but it’s certainly better to set it to the manufacturer’s specifications to be on the safe side.
(cd riocore/plugins/stepdir/ ; make)
In my tests, the problem only occurred at 3.3V;
if you Google ‘DM542 problem’, you’ll find lots of reports of the same issue.
I apologize for asking so many questions. I always use 5V to power the 74HC245 and the driver. If there's a problem, usually adjusting the DirHold time is all that's needed. When I use a Mesa 7i92 + 74HC245 (5V) + DM542 (pulse=10, DirHold=25), everything works perfectly, and it correctly returns to the zero position. However, when I switch to a Tang Nano 9k+ + Riocore + 74HC245 (5V) + DM542 (pulse=10, DirHold=25), it fails to return to the zero position, and adjusting the DirHold time doesn't help.
Last edit: 2 months 1 week ago by viewsat.
Please Log in or Create an account to join the conversation.
- tommylight
- Offline
- Moderator
-
Less
More
- Posts: 22011
- Thank you received: 7491
2 months 2 weeks ago #348699
by tommylight
It is their choice if they want to modify something or not, that is what DIY is about and helps with learning.
You are right about PC817, but you are wrong about dirhold as it does not magically raise the level to 5V on 3.3V systems.
I understand you are trying to help, so thank you, but the way you do it sometimes comes as very offensive and demeaning.
Replied by tommylight on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Tux, you have a nasty way of replying, and you have been warned once about it.
This is wrong way.If I replace the DIR PC817 optocoupler with a high-speed 6N137, it can correctly return to the zero position.
By modifying the driver, you risk damaging it and reducing its reliability.
Although the PC817 has a very low bandwidth, the correct solution is to increase the dirhold.
It is their choice if they want to modify something or not, that is what DIY is about and helps with learning.
You are right about PC817, but you are wrong about dirhold as it does not magically raise the level to 5V on 3.3V systems.
I understand you are trying to help, so thank you, but the way you do it sometimes comes as very offensive and demeaning.
Please Log in or Create an account to join the conversation.
Time to create page: 0.294 seconds