Mitsubishi VFD Modbus cant get it work

More
10 Jan 2022 18:45 #231331 by hitchhiker
Hi.. the switch from mach3 to linuxcnc is not easy...I have a Mitsubishi FR 720 VFD.With Mach3 all works fine.
With Linuxcnc i got error when Start Linuxcnc.I done:
sudo usermod -a -G dialout $USER
sudo grep dialout /etc/groupi
get : dialout:x:20:cnc
sudo chmod 666 /dev/ttyUSB0

ok..then i installed :https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/user_comps/mitsub_vfd.pyand

now... i got errors... i cant understand.. because i use the example....  then i short the example... nothing...

i know..  everyday i write here.... sorry.... but i dont understand what i do wrong... 
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Jan 2022 19:22 #231334 by Clive S
addf parport.0.write base-thread
addf parport.0.reset base-thread

Try moving the above to the end of the addf base thread

Please Log in or Create an account to join the conversation.

More
10 Jan 2022 19:33 #231337 by hitchhiker
i try... but no difference... i reboot... wait a minute and start linuxcnc.. same error.

i thank you.. but why moving the 2 lines. which reason? i want to understand.

another question...
i was thinking that linuxcnc allready have the components installed.. why i must compile the mitusb_vfd.py?!

i installed linuxcnc from live cd


thanks

Please Log in or Create an account to join the conversation.

More
10 Jan 2022 22:46 - 10 Jan 2022 22:47 #231354 by hitchhiker
if i send via terminal:

halcmd loadusr mitsub_vfd -p /dev/ttyUSB1

i get:

cnc@cnc:~$ ('/dev/ttyUSB1', 9600)
Mitsubishi VFD serial computer link has loaded
Port: /dev/ttyUSB1,
baudrate: 9600
8 data bits, no parity, 2 stop bits

Mitsubishi mitsub_vfd VFD: slave# 00 added

Traceback (most recent call last):
File "/usr/bin/mitsub_vfd", line 436, in <module>
app = mitsubishi_serial(vfd_names=device_ids,baudrate=int(baud),port=port)
File "/usr/bin/mitsub_vfd", line 117, in __init__
self.set_special_monitor()
File "/usr/bin/mitsub_vfd", line 296, in set_special_monitor
word = self.prepare_data(cmd,option)
File "/usr/bin/mitsub_vfd", line 318, in prepare_data
return bytes(converted_data, 'utf-8')
TypeError: str() takes at most 1 argument (2 given)


same with :


halcmd loadusr mitsub_vfd -p /dev/ttyUSB1 spindle=01
cnc@cnc:~$ ('/dev/ttyUSB1', 9600)
Mitsubishi VFD serial computer link has loaded
Port: /dev/ttyUSB1,
baudrate: 9600
8 data bits, no parity, 2 stop bits

Mitsubishi spindle VFD: slave# 01 added

Traceback (most recent call last):
  File "/usr/bin/mitsub_vfd", line 436, in <module>
    app = mitsubishi_serial(vfd_names=device_ids,baudrate=int(baud),port=port)
  File "/usr/bin/mitsub_vfd", line 117, in __init__
    self.set_special_monitor()
  File "/usr/bin/mitsub_vfd", line 296, in set_special_monitor
    word = self.prepare_data(cmd,option)
  File "/usr/bin/mitsub_vfd", line 318, in prepare_data
    return bytes(converted_data, 'utf-8')
TypeError: str() takes at most 1 argument (2 given)





whats the reason for the errors?! i cant load in linuxcnc to show me the pins,signals...... its a fresh install of linuxcnc livecd.

thanks
Last edit: 10 Jan 2022 22:47 by hitchhiker.

Please Log in or Create an account to join the conversation.

More
11 Jan 2022 03:18 #231385 by cmorley
What version of linuxcnc are you using?
Mitsub is included in 2.7 and newer.

If I had to guess I'd say it was a python version problem but I need some info to answer.

Please Log in or Create an account to join the conversation.

More
11 Jan 2022 06:01 #231400 by hitchhiker
2.8.2 buster rt live dvd installed from usbstick. 4.0.8.
is this what you mean???
phyton is version 3.7


thanks

Please Log in or Create an account to join the conversation.

More
11 Jan 2022 06:27 #231402 by cmorley
linuxcnc 2.8 only works with python 2

Please Log in or Create an account to join the conversation.

More
11 Jan 2022 06:44 #231403 by hitchhiker
oh ok, please look to the github link.
first line ... pyhton3.

what must i install?

i load from github the raw mitsub_vfd.py
then in install it with

sudo halcompile --install mitsub_vfd.py

this is right?


where can i found the folder for the included comps? i search yesterday the complete night but cant find the folder.

as example... wj200_vfd.comp is not on my harddrive.. is it normal?!

thanks

Please Log in or Create an account to join the conversation.

More
11 Jan 2022 06:46 #231404 by cmorley
mitsub is included in 2.8. you don;t need to download it.
the one included in 2.8 is made for python 2.
the one you downloaded is from master branch , which requires python3

Please Log in or Create an account to join the conversation.

More
11 Jan 2022 06:47 #231405 by hitchhiker
but why i can find it on my harddisk?!

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum