Discussion:
[Emc-developers] hy_vfd
andy pugh
2017-06-15 23:13:25 UTC
Permalink
A user on the forum is wondering why the base frequency (P04) disappeared:
https://github.com/LinuxCNC/linuxcnc/commit/b392fde59b7b7b781f0f183db165113a054a9a23

The commit says that it is never used, but he seems to think that it needs
to be changed when he swaps between spindle motors:
https://forum.linuxcnc.org/38-general-linuxcnc-questions/32903-huanyang-vfd-inverter-modbus-base-frequency#94557

Was the parameter removed because the VFD does not use it for anything?
--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
Sebastian Kuzminsky
2017-06-15 23:33:38 UTC
Permalink
Post by andy pugh
https://github.com/LinuxCNC/linuxcnc/commit/b392fde59b7b7b781f0f183db165113a054a9a23
The commit says that it is never used, but he seems to think that it needs
https://forum.linuxcnc.org/38-general-linuxcnc-questions/32903-huanyang-vfd-inverter-modbus-base-frequency#94557
Was the parameter removed because the VFD does not use it for anything?
I might have goofed there.

I'm used to setting VFD parameters via the VFD face plate, not via HAL,
but clearly that's not the only way to do it.

I also found I had to set the max frequency (PD005), but did not have to
set the base frequency (PD004), whatever that is. I noted this in the
manpage.

If there's a good reason to use the base freq i'm open to reverting the
commit that removes it.
--
Sebastian Kuzminsky
Gene Heskett
2017-06-15 23:47:29 UTC
Permalink
Post by Sebastian Kuzminsky
Post by andy pugh
https://github.com/LinuxCNC/linuxcnc/commit/b392fde59b7b7b781f0f183d
b165113a054a9a23
The commit says that it is never used, but he seems to think that it
https://forum.linuxcnc.org/38-general-linuxcnc-questions/32903-huany
ang-vfd-inverter-modbus-base-frequency#94557
Was the parameter removed because the VFD does not use it for anything?
I might have goofed there.
I'm used to setting VFD parameters via the VFD face plate, not via
HAL, but clearly that's not the only way to do it.
I also found I had to set the max frequency (PD005), but did not have
to set the base frequency (PD004), whatever that is. I noted this in
the manpage.
If there's a good reason to use the base freq i'm open to reverting
the commit that removes it.
Is the base frequency not supposed to be set at the motors nameplate line
frequency, usually 50 or 60 Hz? I think that gives the vfd a basis to
calculate the expected current vs frequency on a curve that fairly well
approximates a constant torque.

OTOH...


Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
andy pugh
2017-06-15 23:50:42 UTC
Permalink
Post by Sebastian Kuzminsky
If there's a good reason to use the base freq i'm open to reverting the
commit that removes it.
I wasn't clear if the setting actually got sent to the VFD. Is it sent in
the old line 364?
--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
Sebastian Kuzminsky
2017-06-16 13:43:38 UTC
Permalink
No, .base-freq was an Out pin, it got read from the VFD and reported to HAL, but never used in the hy_vfd driver.

Did the OP have some Hal circuitry that depended on it maybe?
Post by andy pugh
Post by Sebastian Kuzminsky
If there's a good reason to use the base freq i'm open to reverting
the
Post by Sebastian Kuzminsky
commit that removes it.
I wasn't clear if the setting actually got sent to the VFD. Is it sent in
the old line 364?
--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
--
Sebastian Kuzminsky
andy pugh
2017-06-16 14:32:36 UTC
Permalink
Post by Sebastian Kuzminsky
No, .base-freq was an Out pin, it got read from the VFD and reported to
HAL, but never used in the hy_vfd driver.
Did the OP have some Hal circuitry that depended on it maybe?
He appears to want to set it from HAL. (Because he has one VFD connected to
either of two motors, I think for either a low speed (50Hz) or high speed
(400Hz) spindle.
--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
theman whosoldtheworld
2017-06-16 15:19:25 UTC
Permalink
today I've install new master ... during compiling an error referred hy_vdf
and modbus on timout func .... I know the modbus story on linuxcnc ... so I
regress my libmodbus version at 3.0.5 (at last with purge command and
istall using ubuntu repo) ... but error is stable ... so I correct the file
in these manner, after a make clean commanad:

{
struct timeval t;

// Set the response timeout.
t.tv_sec = 0;
t.tv_usec = 16 * 1000;
modbus_set_response_timeout(mb, 0, 20000); /*** put the time you
want .. probabily solution is using int value in a int var ... but I know
is only a rude solution***/

// Set the byte timeout to -1, to just wait for the complete
// response timeout instead.
//t.tv_sec = -1;
modbus_set_byte_timeout(mb, &t);
}

regards
bkt
Post by andy pugh
Post by Sebastian Kuzminsky
No, .base-freq was an Out pin, it got read from the VFD and reported to
HAL, but never used in the hy_vfd driver.
Did the OP have some Hal circuitry that depended on it maybe?
He appears to want to set it from HAL. (Because he has one VFD connected to
either of two motors, I think for either a low speed (50Hz) or high speed
(400Hz) spindle.
--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
Sebastian Kuzminsky
2017-06-16 15:38:27 UTC
Permalink
Post by theman whosoldtheworld
today I've install new master ... during compiling an error referred hy_vdf
and modbus on timout func .... I know the modbus story on linuxcnc ... so I
regress my libmodbus version at 3.0.5 (at last with purge command and
istall using ubuntu repo) ... but error is stable ... so I correct the file
{
struct timeval t;
// Set the response timeout.
t.tv_sec = 0;
t.tv_usec = 16 * 1000;
modbus_set_response_timeout(mb, 0, 20000); /*** put the time you
want .. probabily solution is using int value in a int var ... but I know
is only a rude solution***/
// Set the byte timeout to -1, to just wait for the complete
// response timeout instead.
//t.tv_sec = -1;
modbus_set_byte_timeout(mb, &t);
}
regards
bkt
You must mean the hy_gt_vfd driver, which is different from the hy_vfd
driver.

We regularly test with libmodbus 3.0.x, and the driver builds there. We
do not currently test with libmodbus 3.1.2 or newer, which has this
updated timeout API.

I just pushed a fix to 2.7 that should make hy_gt_vfd work with both old
and new versions of modbus. I'll merge it into master later today.

Thanks for the bug report!
--
Sebastian Kuzminsky
theman whosoldtheworld
2017-06-16 16:59:26 UTC
Permalink
Post by Sebastian Kuzminsky
We regularly test with libmodbus 3.0.x, and the driver builds there. We
do not currently test with libmodbus 3.1.2 or newer, which has this updated
timeout API.
Post by Sebastian Kuzminsky
I just pushed a fix to 2.7 that should make hy_gt_vfd work with both old
and new versions of modbus. I'll merge it into master later today.
Post by Sebastian Kuzminsky
Thanks for the bug report!
Yes you are in right ... today I've control only .c file ....

bkt
Post by Sebastian Kuzminsky
Post by theman whosoldtheworld
today I've install new master ... during compiling an error referred hy_vdf
and modbus on timout func .... I know the modbus story on linuxcnc ... so I
regress my libmodbus version at 3.0.5 (at last with purge command and
istall using ubuntu repo) ... but error is stable ... so I correct the file
{
struct timeval t;
// Set the response timeout.
t.tv_sec = 0;
t.tv_usec = 16 * 1000;
modbus_set_response_timeout(mb, 0, 20000); /*** put the time you
want .. probabily solution is using int value in a int var ... but I know
is only a rude solution***/
// Set the byte timeout to -1, to just wait for the complete
// response timeout instead.
//t.tv_sec = -1;
modbus_set_byte_timeout(mb, &t);
}
regards
bkt
You must mean the hy_gt_vfd driver, which is different from the hy_vfd
driver.
We regularly test with libmodbus 3.0.x, and the driver builds there. We
do not currently test with libmodbus 3.1.2 or newer, which has this updated
timeout API.
I just pushed a fix to 2.7 that should make hy_gt_vfd work with both old
and new versions of modbus. I'll merge it into master later today.
Thanks for the bug report!
--
Sebastian Kuzminsky
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
Sebastian Kuzminsky
2017-06-16 15:20:16 UTC
Permalink
Post by Sebastian Kuzminsky
No, .base-freq was an Out pin, it got read from the VFD and reported
to HAL, but never used in the hy_vfd driver.
Did the OP have some Hal circuitry that depended on it maybe?
He appears to want to set it from HAL. (Because he has one VFD connected
to either of two motors, I think for either a low speed (50Hz) or high
speed (400Hz) spindle.
Many VFD motor-configuration registers, including PD005 "Maximum
Operating Frequency", can be set by hy_vfd at startup based on
command-line arguments. None of them can be changed at runtime via HAL
pins.
--
Sebastian Kuzminsky
andy pugh
2017-06-16 15:22:24 UTC
Permalink
Many VFD motor-configuration registers, including PD005 "Maximum Operating
Frequency", can be set by hy_vfd at startup based on command-line
arguments. None of them can be changed at runtime via HAL pins.
And I imagine that he has separate configs for each spindle.

However I _believe_ that he is of the opinion that the base frequency is
also important. He may be wrong.
--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
Gene Heskett
2017-06-16 15:54:25 UTC
Permalink
Post by Sebastian Kuzminsky
Post by Sebastian Kuzminsky
No, .base-freq was an Out pin, it got read from the VFD and
reported to HAL, but never used in the hy_vfd driver.
Did the OP have some Hal circuitry that depended on it maybe?
He appears to want to set it from HAL. (Because he has one VFD
connected to either of two motors, I think for either a low speed
(50Hz) or high speed (400Hz) spindle.
Many VFD motor-configuration registers, including PD005 "Maximum
Operating Frequency", can be set by hy_vfd at startup based on
command-line arguments. None of them can be changed at runtime via
HAL pins.
The little booklet that came with mine, seems to assume it has a working
rs-485/22 interface. There are sequences of data that could be sent
thru that interface, to select the PDxx register and then write to it.
I'd have to assume that this could be done in real time since I can
manipulate it while its running the motor from its own front panel. That
is not a hal job unless hy_vfd can access a file for all that data, and
the hal pin switched then would cause it to (re)load one of the two
profiles to run the given motor. 2 pins would allow 4 profiles etc.

However, he would be taking a high chance of destroying the vfd when
switching motors while its live since they do NOT like loose connections
or switches whose conacts bounce on their outputs, and they ALL do. And
if he is actually switching the motor in its mounts on the same machine,
I'd think he would be far safer by just having two configs, loading the
one for that motor. Thats only a small slice of time compared to
physically switching out the motor itself.

There's a guy named Murphy watching such things carefully, just waiting
to stick out a foot and trip us up. No use tempting him.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Loading...