Huanyang VFD speed display vs LinuxCNC speed display
12 Apr 2017 05:08 - 12 Apr 2017 17:08 #91226
by {HD}
Huanyang VFD speed display vs LinuxCNC speed display was created by {HD}
I have my Huanyang VFD connected to LinuxCNC via a 232-485 adapter. I setup my configurations just like in this video: (4:29 is the time in the video where both configuration files are on screen).
I can turn my spindle on and off and adjust the speed via LinuxCNC software but, the displayed speed in software is different than what is displayed on the VFD LCD.
I have tried "loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600 -S 24000" but adding the "-S 24000" seems to change the P144 value of the VFD to 2400. However if I start the software then change the value of P144 back to 3000 it works both speed indicators match.
If I set -S 3000 then at software 1000rpm I get hardware 8000rpm.
If I set -S 24000 then at software 1000prm I get hardware 800rpm.
BUT again
If I set -S 24000 then change P144 back to 3000 then I get software 1000rpm hardware 1000rpm.
What do I need to change to get this to work by default I feel like something is just slightly off.
I can turn my spindle on and off and adjust the speed via LinuxCNC software but, the displayed speed in software is different than what is displayed on the VFD LCD.
I have tried "loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600 -S 24000" but adding the "-S 24000" seems to change the P144 value of the VFD to 2400. However if I start the software then change the value of P144 back to 3000 it works both speed indicators match.
If I set -S 3000 then at software 1000rpm I get hardware 8000rpm.
If I set -S 24000 then at software 1000prm I get hardware 800rpm.
BUT again
If I set -S 24000 then change P144 back to 3000 then I get software 1000rpm hardware 1000rpm.
What do I need to change to get this to work by default I feel like something is just slightly off.
Last edit: 12 Apr 2017 17:08 by {HD}.
Please Log in or Create an account to join the conversation.
12 Apr 2017 15:28 - 12 Apr 2017 15:29 #91251
by {HD}
Replied by {HD} on topic Huanyang VFD speed display vs LinuxCNC speed display
This is the source from hy_vfd.c that I found relevant to my situation.
If you plug my #'s into the variables it seems like it should work. If I pass -S 24000 : 24000(rated motor rev) / 400(max freq) * 50 = 3000. But, 2400 is the value that gets pushed to my VFD.
hc_data->parameter = 144; // PD144 Rated Motor Rev (at 50 Hz)
if (*haldata->rated_motor_rev != 0) {
// user passed in motor max speed
// we know motor max freq
// write the VFD's P144 with "motor speed at 50 Hz"
rpm_at_50hz = (*haldata->rated_motor_rev / *haldata->max_freq) * 50.0;
hc_data->function = FUNCTION_WRITE;
hc_data->data = (uint16_t)rpm_at_50hz;
if ((retval = hy_comm(hc_param, hc_data)) != 0) {
goto failed;
}
hc_data->function = FUNCTION_READ;
}
if ((retval = hy_comm(hc_param, hc_data)) != 0)
goto failed;
rpm_at_50hz = hc_data->ret_data;
*(haldata->rated_motor_rev) = (rpm_at_50hz / 50.0) * *haldata->max_freq;
if (hc_param->debug) {
printf("read_setup: read setup parameters - OK.\n");
}
If you plug my #'s into the variables it seems like it should work. If I pass -S 24000 : 24000(rated motor rev) / 400(max freq) * 50 = 3000. But, 2400 is the value that gets pushed to my VFD.
Last edit: 12 Apr 2017 15:29 by {HD}.
Please Log in or Create an account to join the conversation.
12 Apr 2017 17:06 #91260
by {HD}
Replied by {HD} on topic Huanyang VFD speed display vs LinuxCNC speed display
Well after screwing around for 2 days trying to get it to work. I decided to apply updates/upgrades. I was reluctant to do this because it meant I had to make a Ethernet cable to reach my CNC machine.
DON'T BE LAZY! APPLY THE UPDATES! THEY FIX THINGS!
I don't know what the issue was and the CODE I listed in the previous post was the 'updated' code but it now WORKS!
Problem solved.
DON'T BE LAZY! APPLY THE UPDATES! THEY FIX THINGS!
I don't know what the issue was and the CODE I listed in the previous post was the 'updated' code but it now WORKS!
Problem solved.
The following user(s) said Thank You: whoppa
Please Log in or Create an account to join the conversation.
15 Dec 2019 23:47 #152701
by whoppa
Replied by whoppa on topic Huanyang VFD speed display vs LinuxCNC speed display
Wow I wish a few posts like this were put in a file somewhere for newbies,
Try this first!.. I spent about two weeks off and on trying to sort this issue before stumbling on to this post. Consulted several local experts, tried 3 different RS485 adaptors and many VFD settings, different wiring twisted pair, shielded cable, added grounds etc.Why is this sort post so hard to find.
I was not aware that a five minute update would fix the problem,
I was not even aware my linuxcnc was not the latest 2.7.14 version.
Great program but why is everything so secret squirrel?
Try this first!.. I spent about two weeks off and on trying to sort this issue before stumbling on to this post. Consulted several local experts, tried 3 different RS485 adaptors and many VFD settings, different wiring twisted pair, shielded cable, added grounds etc.Why is this sort post so hard to find.
I was not aware that a five minute update would fix the problem,
I was not even aware my linuxcnc was not the latest 2.7.14 version.
Great program but why is everything so secret squirrel?
Please Log in or Create an account to join the conversation.
Time to create page: 0.074 seconds