Error Running VFD and Spindle
Also I am running a 7i76e and setup via Pncconfig
I have a Huanyang VFD which I have set up as per the manpage
The error I receive when attempting to start linuxcnc is as follows:
Debug file information:
Note: Using POSIX realtime
./custom.hal:4: execv(vfd): No such file or directory
./custom.hal:4: waitpid failed vfd vfd
./custom.hal:4: vfd exited without becoming ready
5584
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
Also note that when I open a terminal and use the following commands that I CAN get the spindle to run.
halrun
loadusr -W hy_vfd -d /dev/ttyUSB0
show pin
setp hy_hy_vfd.enable 1
setp hy_vfd.speed-command 600
setp hy_vfd.spindle-forward 1
setp hy_vfd.spindle-on 1
With the above terminal commands through halrun the spindle WILL turn on and run. Having discovered this I know that the usb device is wired properly to the vfd, and through halrun it is communicating properly to get the spindle moving. Nevertheless I am lost as to why Linuxcnc would give me the above mentioned error when attempting to start the program. I have attached the hal and custom hal files as well as the ini file although it may be irrelevant. If anyone can point me to the error of my ways I would greatly appreciate it.
Please Log in or Create an account to join the conversation.
loadusr -W vfd hy_vfd -d /dev/ttyUSB0
to read this:
loadusr -W hy_vfd -d /dev/ttyUSB0
and I received this error:
Note: Using POSIX realtime
open: Permission denied
./custom.hal:4: waitpid failed hy_vfd hy_vfd
./custom.hal:4: hy_vfd exited without becoing ready 9470
PID TTY Stat Time Comand
Stopping realtie threads
Unloading hal components
Note: Using POSIX realtime
Please Log in or Create an account to join the conversation.
Maybe this will help you guys help me. I edited the custom hal file from this:
loadusr -W vfd hy_vfd -d /dev/ttyUSB0
to read this:loadusr -W hy_vfd -d /dev/ttyUSB0
and I received this error:Note: Using POSIX realtime
open: Permission denied
./custom.hal:4: waitpid failed hy_vfd hy_vfd
./custom.hal:4: hy_vfd exited without becoing ready 9470
PID TTY Stat Time Comand
Stopping realtie threads
Unloading hal components
Note: Using POSIX realtime
I answered my own question there. Thanks to an old post by andypugh I went back and charmod the permissions on the USB.. so a new update:
Linuxcnc did open with the above command so that much works.
New issue is that the commands that you will find in the custom hal file posted above are not recognized as pins. Apparently those are old pin names and not serving Master version of linuxcnc. Most documentation I can see is for 2.7. Any help with setting the right pins in the custom hal to get it running would be a great help. I am combing through the info I can find to see if I can fix this myself and will update this thread if I get it running.
Thanks
Please Log in or Create an account to join the conversation.
If the forum mods would like to remove this post please feel free to do so. Yet I will post new files here for the sake of posterity.
There were several problems that I had to work out. Namely most directions I found online were attempting to set up this from files generated from the stepconfig wizard and I used the pncconfig wizard. Also.... watch the flipping names of things when coding... I swear it can give you fits.
The difference between the examples you see online and when using another wizard such as the pncconfig is that with pncconfig it will wire pins for you. I had to go back and # out the pins which were wired, then go into the custom hal to rewire them.
Also there are some obvious pin name changes from some of the older examples online. If anyone wanted to see what the pins look like under Master (which isnt different from 2.7) and then compare to older versions of linuxcnc feel free to download the custom hal file I will attach. Please ignore all of the # out lines as they are useless and were other various attempts.
Now for a final question for the experts out there:
Since I had to # out the pins in the main hal file, is there any way possible that I can fix this so I do not have to go back into the main hal file to edit those pins again every time I rerun the pncconfig wizard? Once I run the wizard again it will automatically reset those wired pins back to active.
By the way, thanks guys for the great work in the past to help me figure this out. You are always awesome even for those who lurk here but may not ask many questions. The older posts by andypugh helped immensely.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
- Posts: 4981
- Thank you received: 1377
Please Log in or Create an account to join the conversation.
Since I had to # out the pins in the main hal file, is there any way possible that I can fix this so I do not have to go back into the main hal file to edit those pins again every time I rerun the pncconfig wizard?
You can use the "unlinkp" command in the custom HAL to undo the connections made by the PnCConf-created HAL.
But, in practice, once the machine is working you shouldn't need to use PnCConf again. And once you have the config it is generally easier to make the changes directly in the HAL and INI anyway.
Please Log in or Create an account to join the conversation.