Hitachi WJ200 Setup

More
06 Jul 2018 16:53 #113586 by oro06
Replied by oro06 on topic Hitachi WJ200 Setup
pull request github.com/LinuxCNC/linuxcnc/pull/457 pending
looking forward some feedback

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

More
12 Jan 2020 17:50 #154700 by andypugh
Replied by andypugh on topic Hitachi WJ200 Setup
I have just realised that the WJ200 driver uses a different style of module parameter passing.

To change the device you need:

loadusr wj200_vfd --device /dev/ttyUSB0

Other options are:
--baud
--parity
--stopbits
--databits
--device

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

More
09 Nov 2020 00:08 #188709 by lrak
Replied by lrak on topic Hitachi WJ200 Setup
Looks like I stumbled into this - I was under the misunderstanding that wj200 support was in linuxcnc already - looks like it was not working 2018?

If I need to fix something - is the version in the main source today, the one under construction?

Also - I am told that the cheap RS232 - to - RS485 converters steal power from RTS and CTS so you might need to set them or use an external powersupply for reliable operation - (I used to support a ROM emulator that was powered the same way).. A flaky com link can make software debugging --- ah - a bit interesting.

I would appreciate any information on the current status of the wj200_vfd component. I see the man page, but if I try to load it, I get:

wj200_vfd: dlopen: /usr/lib/linuxcnc/modules/wj200_vfd.so: cannot open shared object file: No such file or directory

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

More
09 Nov 2020 01:09 - 09 Nov 2020 01:13 #188712 by cajbr
Replied by cajbr on topic Hitachi WJ200 Setup
I've been using the WJ200 over an RS232-485 converter on a new install of 2.8. It also worked on 2.7.14 previously. I've attached my custom.hal.

BR
# Include your customized HAL commands here
# This file will not be overwritten when you run stepconf again
loadusr -W wj200_vfd
setp wj200-vfd.0.mbslaveaddr 1
net spindle-reverse wj200-vfd.0.reverse <= spindle.0.reverse
net spindle-run wj200-vfd.0.run <= spindle.0.on
net spindle-at-speed wj200-vfd.0.is-at-speed => spindle.0.at-speed
net spindle-enable wj200-vfd.0.enable motion.motion-enabled
loadrt mult2
addf mult2.0 servo-thread
setp mult2.0.in1 0.04
net command-speed mult2.0.in0 spindle.0.speed-out-abs
net vfd-speed wj200-vfd.0.commanded-frequency mult2.0.out
Last edit: 09 Nov 2020 01:13 by cajbr. Reason: add hal text
The following user(s) said Thank You: lrak

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

More
09 Nov 2020 01:46 - 09 Nov 2020 01:53 #188713 by lrak
Replied by lrak on topic Hitachi WJ200 Setup
Did you build it? Not part of

linuxcnc-uspace 1:2.8.0
linuxcnc-uspace-dev 1:2.8.0

I tested with mbpoll - but there is no component to load - I was thinking it might be broken thus not included in the deb?

I get:

wj200_vfd: dlopen: /usr/lib/linuxcnc/modules/wj200_vfd.so: cannot open shared object file: No such file or directory

I Just figured it out -- loadusr not loadrt..
Last edit: 09 Nov 2020 01:53 by lrak. Reason: found the problem

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

More
09 Nov 2020 07:06 #188726 by tommylight
Replied by tommylight on topic Hitachi WJ200 Setup
Loadusr = user space component
Loadrt = real time component.
The following user(s) said Thank You: lrak

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

More
09 Nov 2020 19:43 #188786 by lrak
Replied by lrak on topic Hitachi WJ200 Setup
I wonder if someone knows how to ping oro06 on this? I don't see that he has been active here for a couple of years?

I'm got it working - not satisfied -

WJ200 should not talk to the drive when it isn't powered - need a pin to drive with
iocontrol.0.user-enable-out or halui.estop.is-activated

- When physical estop happens - this drive will still run for a bit - and should stop the spindle - so send one last command to the drive and disable communications until the physical estop is out again.

Also, it should refuse to start at 0-speed.

Possibly an input for scaling the requested rpm to a frequency..

I will have to rewrite this after I get a few other bits sorted out. It looked like oro06 was working on this -he had major changes
but I don't think it compiled - last activity 2 years ago.

Some drive parameters take a reboot to change..
Looks like he was building a meter-display - and other improvements - here is HIS list in italics

a)work if a frequency range (min and max) is configured in the vfd if frequency setpoint is lower than min frequency a stop is issued
if frequency setpoint is higher than max frequency, setpoint is overwritten with max frequency.
b)stop issued when exiting
c)more registers accessible like current frequency, instant power
consumption and motor information
d)added a failure mode if registers could not be read after several attempt
e)use of 'variable' declaration to store instance variables
f)added simple log with ms timing
g)split modbus transaction in 2 groups static and dynamic
the former being read only once
h)add optionnal --verbose to loadusr command, to view in-loop live
modbus registers
i)fix possible issue when attempting to set frequency higher than 655.35 Hz
j)started a dedicated gladevcp .ui and .hal
k)added a version number

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

More
10 Nov 2020 13:28 #188871 by Todd Zuercher
Replied by Todd Zuercher on topic Hitachi WJ200 Setup
I'd recommend hard wiring an estop signal to the drive and not relying on the serial connection for it.
The following user(s) said Thank You: lrak

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

More
11 Nov 2020 22:22 #189053 by lrak
Replied by lrak on topic Hitachi WJ200 Setup
@Todd
The physical estop already exists - wouldn't do it any other way - thus the problem. If the drive isn't powered it spams the command line with error lines - one is enough.

Good news, is I fixed the component code this morning - if not enabled, it only sends the "failed to get status" error once.

The problem with just the estop loop - things in motion tend to stay in motion. So instead, when estop is pressed - and thus yanks wj200-vfd.0.enable - the driver sends a trip-alarm (02) and it will quickly decelerate to a stop - the deceleration actually helps power the non powered inverter - and stop the spindle. I have this working now.

I have the wj200-vfd.0.enable connected to halui.machine.is-on - so the machine-on/off button should stop all motion even at the software level.

,.,. now - Looking at adding a scaling input to the component - currently it sets the Hz going to the drive - a fp scale input could be used to scale to RPM. There are frequency limits one can program into the wj200..

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

More
10 Apr 2021 04:43 #205501 by lrak
Replied by lrak on topic Hitachi WJ200 Setup
Anyone using this with an existing motor - adding a PTC sensor is not hard. (protect the motor from overheating).

a KTY81/222 is a reasonable choice. One note - the C085 offset works backwards.. 90% would trip higher than 100%.

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

Time to create page: 0.098 seconds
Powered by Kunena Forum