HY VFD and RS232>RS485 converter
- dangu85
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 1
05 Sep 2019 17:27 #144254
by dangu85
HY VFD and RS232>RS485 converter was created by dangu85
Hi. I have a chinese huanyang vfd to control my spindle and decided to control it throug RS485.
The plan is to send/receive the data using the rs232 of the PC.
I've followed this
It seems on the scope that data is transmitted on txd pin and axis starts with no problem
Now i'm thinking to build the converter using a sn75176 driver and optocouplers because I'd like to opto-isolate the PC RS232 from the vfd.
Now the problem. Since comunication is half-duplex, how does the RS232 set the data direction of the comunication???
On the net I found this which seem good
www.kswichit.com/PC485/PC_Rs485.html
It uses the RTS pin to set the data direction, but checking with the scope it never changes its state. Neither any other pin, except TXD which transmits something i dont know at fixed intervals
my custom.hal
my custom_postgui.hal
The plan is to send/receive the data using the rs232 of the PC.
I've followed this
It seems on the scope that data is transmitted on txd pin and axis starts with no problem
Now i'm thinking to build the converter using a sn75176 driver and optocouplers because I'd like to opto-isolate the PC RS232 from the vfd.
Now the problem. Since comunication is half-duplex, how does the RS232 set the data direction of the comunication???
On the net I found this which seem good
www.kswichit.com/PC485/PC_Rs485.html
It uses the RTS pin to set the data direction, but checking with the scope it never changes its state. Neither any other pin, except TXD which transmits something i dont know at fixed intervals
my custom.hal
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyS0 -p none -r 9600
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw motion.spindle-forward => vfd.spindle-forward
net spindle-ccw motion.spindle-reverse => vfd.spindle-reverse
net spindle-on motion.spindle-on => vfd.spindle-on
my custom_postgui.hal
sets spindle-at-speed true
setp vfd.enable 1
Please Log in or Create an account to join the conversation.
- pl7i92
- Offline
- Platinum Member
Less
More
- Posts: 1875
- Thank you received: 354
05 Sep 2019 18:30 #144258
by pl7i92
Replied by pl7i92 on topic HY VFD and RS232>RS485 converter
you do not need a isolation it is alredy double isolated
you can use it to adapter as so many do
just hook it up and go for it
you can use it to adapter as so many do
just hook it up and go for it
Please Log in or Create an account to join the conversation.
- dangu85
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 1
13 Sep 2019 16:01 #145062
by dangu85
Replied by dangu85 on topic HY VFD and RS232>RS485 converter
Ok.Done.
Now it's running fine.
Only thing I've done different is to change PD001 to 1, so I send speed only over the modbus and give the direction/run/stop from the p-port. That's because of how I use e-stop.
Now I'm trying to link a few signals to glade but the hal_vfd page is not clear on what are all signals.
linuxcnc.org/docs/2.7/html/man/man1/hy_vfd.1.html
I don't understand what these are
Is there a way to know if the vfd has tripped and what caused it, to link on a led in glade??
And the same to know the status of the output relays the vfd has?
Now it's running fine.
Only thing I've done different is to change PD001 to 1, so I send speed only over the modbus and give the direction/run/stop from the p-port. That's because of how I use e-stop.
Now I'm trying to link a few signals to glade but the hal_vfd page is not clear on what are all signals.
linuxcnc.org/docs/2.7/html/man/man1/hy_vfd.1.html
I don't understand what these are
<name>.CNTR
(float, out)
<name>.CNST
(float, out)
<name>.CNST−run
(bit, out)
<name>.CNST−jog
(bit, out)
<name>.CNST−command−rf
(bit, out)
<name>.CNST−running
(bit, out)
<name>.CNST−jogging
(bit, out)
<name>.CNST−running−rf
(bit, out)
<name>.CNST−bracking
(bit, out)
<name>.CNST−track−start
(bit, out)
Is there a way to know if the vfd has tripped and what caused it, to link on a led in glade??
And the same to know the status of the output relays the vfd has?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4862
17 Sep 2019 16:35 #145409
by andypugh
Replied by andypugh on topic HY VFD and RS232>RS485 converter
I would guess that those relate directly to entries in the HY manual and that the author of the HAL component had no idea what they do either, if the manual doesn't explain.
Please Log in or Create an account to join the conversation.
Time to create page: 0.058 seconds