- Posts: 959
- Thank you received: 489
Remora - ethernet NVEM / EC300 / EC500 cnc board
- scotta
- Offline
- Platinum Member
-
Less
More
1 year 5 months ago #328934
by scotta
Replied by scotta on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Hi DarkPhoinix,
The Step Length and Step Space need to be integers / whole numbers. So go with 5 and 3.
The Step Length and Step Space need to be integers / whole numbers. So go with 5 and 3.
The following user(s) said Thank You: DarkPhoinix
Please Log in or Create an account to join the conversation.
- PopBang
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 0
1 year 5 months ago - 1 year 5 months ago #329356
by PopBang
Replied by PopBang on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Hey guys, I'm pretty new to all this coding jazz, but I've fumbled my way through a bit so far. I'm using a NVEM V2 board with the NVMPG to control a RongFu RF31 i have retro fitted with some stepper/servos. So far i can move the X Y Z axes accurately using the key board and the NVMPG, I can also select axes with the NVMPG and I'm seeing all the inputs work in the Hal Configuration. But now I'm at a loss at how to modify the Hal file to get those inputs to function, especially the estop. I'm using a N/O estop switch and it's switching remora.input.04 to false (.04.not to True) when hit.
What do i need to add to the Remora-nvem.hal file to make it work?
Or does any one have an already working .Hal file for the NVEM V2 with limit switches and other typical milling functions i could look over?
Thanks
What do i need to add to the Remora-nvem.hal file to make it work?
Or does any one have an already working .Hal file for the NVEM V2 with limit switches and other typical milling functions i could look over?
Thanks
Last edit: 1 year 5 months ago by PopBang. Reason: bad layout
Please Log in or Create an account to join the conversation.
- scotta
- Offline
- Platinum Member
-
Less
More
- Posts: 959
- Thank you received: 489
1 year 4 months ago #330233
by scotta
Replied by scotta on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
@Murphy,
I've made some code changes which may help with the spindle issues. Would greatly appreciate your feedback.
github.com/scottalford75/Remora-RT1052-c...t1052-3.1.4.beta.bin
Thanks
I've made some code changes which may help with the spindle issues. Would greatly appreciate your feedback.
github.com/scottalford75/Remora-RT1052-c...t1052-3.1.4.beta.bin
Thanks
The following user(s) said Thank You: Murphy
Please Log in or Create an account to join the conversation.
- Murphy
- Offline
- Elite Member
-
Less
More
- Posts: 163
- Thank you received: 5
1 year 4 months ago - 1 year 4 months ago #330237
by Murphy
Replied by Murphy on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Thank you scotta, Im back early next week, I'll try it then and let you know.
Last edit: 1 year 4 months ago by Murphy.
Please Log in or Create an account to join the conversation.
- tuxcnc
- Offline
- Elite Member
-
Less
More
- Posts: 297
- Thank you received: 56
1 year 4 months ago - 1 year 4 months ago #330518
by tuxcnc
Replied by tuxcnc on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
I can't drive EC500 spindle encoder to work.
(The counter works properly, but index not. I can use encoder's index output as ordinary I/O, but this not satisfied me due to delays)
I suspect, this never will work, because the used code is wrong way.
I'm developing similar project (but only spindle support) on STM32F103, and my code seems works properly.
Here you are most important fragments:
[/code]
(The counter works properly, but index not. I can use encoder's index output as ordinary I/O, but this not satisfied me due to delays)
I suspect, this never will work, because the used code is wrong way.
I'm developing similar project (but only spindle support) on STM32F103, and my code seems works properly.
Here you are most important fragments:
Code:
[code]//********************************************************
This is a fragment of code from other project
Not for copy/paste, only for explanation
//********************************************************
// EC500 side
// fb. prefix means variables will send from EC500 to hal component
struct fbPacket {
float raw_encoder;
float encoder_latched;
} fb = { 0.0, 0.0 };
fb.raw_encoder = encoder.getCount();
void index_ISR1() { // interrupt handler
fb.encoder_latched = encoder.getCount();
}
//********************************************************
// Hal component side
// fb. prefix means variables received from EC500
// index_ena is i/o hal pin for connect to spindle.0.index_enable
// pos_scale is hal input pin
// period is LinuxCNC global variable
// pos and vel are hal output pins
// Not need anything else for synchronising spindle
float old_pos;
float latched_enc;
float encoder_latched_old;
float delta_pos;
float delta_time;
struct FB {
float raw_encoder;
float encoder_latched;
} fb = { 0.0, 0.0 };
if ((encoder_latched_old != fb.encoder_latched) && (index_ena)) {
latched_enc = fb.encoder_latched;
old_pos = (fb.raw_encoder - latched_enc);
index_ena = false;
}
encoder_latched_old = fb.encoder_latched;
pos = (fb.raw_encoder - latched_enc) / pos_scale;
delta_pos = pos - old_pos;
old_pos = pos;
delta_time = period * 1e-9;
vel = delta_pos / delta_time;
//********************************************************
Code:
Last edit: 1 year 4 months ago by tuxcnc. Reason: edit the code
Please Log in or Create an account to join the conversation.
- scotta
- Offline
- Platinum Member
-
Less
More
- Posts: 959
- Thank you received: 489
1 year 4 months ago #330531
by scotta
Replied by scotta on topic Remora - ethernet NVEM / EC300 / EC500 cnc board
Hi, which module have you been trying to use? The software Encoder module or the QDC module? Both support the index pulse detection and encoder count latching so LinuxCNC can acquire the index position count.
Please Log in or Create an account to join the conversation.
Time to create page: 2.643 seconds