Hitachi WJ200 Setup

More
09 Aug 2017 22:49 #97265 by gjvander
gjvander created the topic: Hitachi WJ200 Setup
Hi,

My first post on the forum, and complete noob to Linux. Trying to switch my PCNC1100 over to LinuxCNC. I have a Hitachi WJ200 that I had working with Brains in Mach3. Trying to duplicate setup in some manner, but it has been a struggle. I am also planning to add DL06 to the system, hence the desire for Classicladder.

First thing - I am using the Ch340 RS485 USB device. It appears to work since Modpoll shows correct values (16.90 Hz etc).



I have Classicladder configured with the same parameters:



My question is how do check if Classicladder is talking to the VFD before I start trying to connect pins etc? Can I pull up parameters somewhere and see the 1690 number, for instance? What minimum configuration do I need to in Classicladder under the "Modbus I/O register setup" tab.

I get a communication error from LCNC on startup for Modbus, which makes me think that LCNC is not talking to the VFD.

Regards,

Geo
Attachments:
More
10 Aug 2017 03:01 #97268 by Todd Zuercher
Todd Zuercher replied the topic: Hitachi WJ200 Setup
There is a modbus driver included with Linuxcnc specifically for the WJ200 VFD.
linuxcnc.org/docs/html/man/man9/wj200_vfd.9.html
Have you given it a try?
More
10 Aug 2017 12:40 #97283 by gjvander
gjvander replied the topic: Hitachi WJ200 Setup
Yes, I did try the Wj200 driver. My understanding is that it is hard coded to ttyS0 (which I verified when I found the module on Github), while the CH340 mounts as ttyUSB0 on my machine. I did try to do a soft link (ln -s) to map USB0 to ttyS0, and the module does show up in LCNC. However, when I try to use setp to get any type of response out the VFD,I get no results.

So it is a little bit frustrating to debug the system blindly.

I also tried to recompile the driver with USB0 in there, but the amount of errors that followed was highly problematic for somebody like me who is new to Linux. If you are willing to walk me through the process of recompiling, that would be greatly appreciated.

Open to suggestions. Again, my first goal is just to verify that I am seeing any interaction between LCNC and the VFD.

Geo
More
10 Aug 2017 15:14 #97297 by Todd Zuercher
Todd Zuercher replied the topic: Hitachi WJ200 Setup
My suggestion is that someone really should rewrite this driver so that it can accept different configuration options similar to most of the other VFD drivers. (No, I don't expect you to do that.)

I am no expert at using Halcompile (barely even a novice), but I have used it a couple of times. (With a whole lot of help from others here.)

Tell us exactly what you did? (What files you changed, what you changed in them, and what filenames you saved them as and where and what were the error messages you encountered?)
More
10 Aug 2017 23:19 #97320 by gjvander
gjvander replied the topic: Hitachi WJ200 Setup
Todd,

Not sure I have the files in the right directory? I just created a directory under my home directory:

/home/gjvander/linuxcnc/VFD

If not corrcet, please be specific about the location.

See below for error.

Geo
Attachments:
More
14 Aug 2017 15:55 #97464 by andypugh
andypugh replied the topic: Hitachi WJ200 Setup

Todd Zuercher wrote: My suggestion is that someone really should rewrite this driver so that it can accept different configuration options similar to most of the other VFD drivers. (No, I don't expect you to do that.)


Even better, the person who wrote the driver should document the command-line parameters:

github.com/LinuxCNC/linuxcnc/blob/master.../wj200_vfd.comp#L171

It looks like you can use
loadusr wj200 device="/dev/ttyUSB0"

Some experimentation might be required...
More
16 Aug 2017 15:06 #97581 by gjvander
gjvander replied the topic: Hitachi WJ200 Setup
Andy,

Thanks for the response. I did try a few variation of device parameter, but all of them gave errors.

I will follow up with a post to show what I tried and what errors I got.

On the plus side, I have Classicladder talking to the WJ200 without errors. I can turn on the spindle and set speed with setp commands. Now I have to figure out how to connect to LCNC spindle logic.

Geo
More
17 Aug 2017 14:34 #97629 by andypugh
andypugh replied the topic: Hitachi WJ200 Setup
It is important not to have spaces between device and = and the string
Time to create page: 0.282 seconds
Powered by Kunena Forum