Hitachi WJ200 VFD Modbus driver problem

More
08 Jun 2023 23:15 #273221 by dokwine
Apologies if this is in the wrong group...

I am converting from an HY VFD to the WJ200. I have the WJ200 set up for Modbus control and all the communications parameters set (baud, parity, ...) to match the driver:
     loadusr -W wj200_vfd --device /dev/ttyUSB0 --baud 9600 --parity N --stopbits 1 --databits 8
     setp     wj200-vfd.0.mbslaveaddr 1

Things appear to be working correctly. I can see the watchdog flashing, set the enable bit on the VFD, and read back a correct-looking heatsink temp (all via halshow for now). BUT when I go to write the "commanded-frequency" to the VFD (I chose 100Hz as ~ =6k rpm on a 2-pole spindle) I get:
    Error: wj200_vfd slave(1): failed to set frequency - Modbus error (112345692) -  Invalid exception code

Not really sure where to start running this down and would appreciate some suggestions

I am running on the 2.8.4 release package with Buster and Preempt.

Thanks,
Ron

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

More
10 Jun 2023 10:22 #273263 by andypugh
Is the drive set up to take the ferequency command from Modbus? I don't know if it is the case for the WJ200 but some VFDs need to have the frequency source set to modbus as well as having modbus communications enabled.

You could try sending the commands by "hand". I have found that CuteCom works well for debugging. I can't remember if it can calculate the checksum, though. I may have done that seperately in an online checksum calculator.

The modbus protocol isn't too hard to understand, you can build your own command packets by hand fairly easily.
I found this useful recentl when implemeinting `Modbus from scratch for Mesa cards. en.wikipedia.org/wiki/Modbus
The following user(s) said Thank You: dokwine

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

More
10 Jun 2023 23:55 #273304 by dokwine
Thank you for looking Andy.

Yes, foolish mistake on my part. I confounded the VFD's Max frequency setting with Line frequency. It wasn't happy with 100Hz when it thought its max was supposed to be 60. Set the VFD to 400 for my spindle, and a bit of dinking around getting things hooked up and I seem to be up and running.

Thanks again!

Ron

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

Time to create page: 0.072 seconds
Powered by Kunena Forum