Hello Guest it is April 25, 2024, 12:12:12 PM

Author Topic: WJ200 low and high range hex frequency data  (Read 37410 times)

0 Members and 1 Guest are viewing this topic.

Re: WJ200 low and high range hex frequency data
« Reply #20 on: September 16, 2013, 05:10:02 PM »
Couple of WJ200 setting things important to remember.

If you are using a brand new drive - Do the power test and verify the Drive works.

Then when ready, connect up and change:
A001 to 03
A002 to 03
Verify all your settings for com speed (c071 to c078)
then once everything is set/stored/saved
POWER OFF YOUR WJ200, wait 5 min (I waited about 1 min and it was fine), Then POWER IT BACK ON (or reset it) - You need to do that before Modbus control will work
TX+ on RS485 adapter to SP on the Hitachi WJ200
TX- on RS485 adapter to SN on Hitachi WJ200
Verify your serial port settings on the PC, make sure they match the inverter, and set those in Mach as well.

I have a WJ200 and I am have a heck of a time getting mod bus to work..  Curious of others settings for testing it.  I have read all of Sinji posts including finding the thread that he supposedly got help on at Yahoo.

I am using a USB to RS485 specifically MWE820B at USCONVERTERS this one: http://www.usconverters.com/index.php?main_page=product_info&cPath=75&products_id=311
The way I have everything connected is as Bloomingtonmike said above, of course I read the manual to verify and all looks right to me.

I am using mach3 Full paid version R3.043.066
Modbus has been enabled within Mach 3
Simply using the Test ModBus function I am able to connect to my COMM port and I have connected the RS-485 terminals to a data analyzer and can confirm I am writing data to the WJ200 but nothing at all happens.
I believe the data formats for everything is incorrect but NOBODY including Hitachi can seem to verify anything for me.  Can somebody simply tell me what I should be typing into the Test ModBus window to make a simple run command work?
Here is what I am typing:
PortNum: 10 (of course everybody is different)
BaudRate: 57600 (again each to their own)
SlaveAddr: 1 (My WJ200 is also set to 1)
StartC: 0  (This is my biggest unknown according the WJ200 Manual Section B-24 Run command is 0001 but in the Hitachi Example 3 that Sinji provided it should be 2 what ever the case I have tried 0, 1, 2 and gotten nothing to happen.
NumCoils: 1
Data: Currently writing 65280 however I have tried 0001, 1, FF00, 255 none work

WJ200 settings are what the manual recommend and correspond to my COM settings:
Then when ready, connect up and change:
A001 to 03
A002 to 03
Verify all your settings for com speed (c071 to c078): done these match my PC COMM settings
then once everything is set/stored/saved
POWER OFF YOUR WJ200, wait 5 min (I waited about 1 min and it was fine), Then POWER IT BACK ON (or reset it) - You need to do that before Modbus control will work
A+ on USB->RS485 adapter to SP on the Hitachi WJ200
B- on USB->RS485 adapter to SN on Hitachi WJ200
GND on USB->RS485 adapter to GND on Hitachi WJ200

Yes I did the whole power off to reset my WJ200 with latest settings  I have also power cycled the PC and Mach3 to verify settings are set and look good.

Now where things get a little sketchy for me:  I decided to make sure data was coming out of the USB->RS485 converter by hooking up a serial data bus analyzer.  On the A+ pin and B- pin (this is RS-485 on my converter)  I see the data coming out and I can successfully change values like the slave address or start coil and number of coils however when I write 65280 as my data it looks like the USB converter is converting it to dec.

So if I write to the Coils (05) the following data from the Test ModBus window:

SlaveAddr: 1
StartC: 2
NumCoils: 1
Data: FF00

my Data analyzer shows the following:  01 05 00 02 FF 00 2D FA
Which basically looks right however the last 16 bits of the CRC does not  according to the WJ200 manual is 8C A3 but I get 2D FA

Any help would greatly be appreciated or screen captures of what I should be writing with the updated software all the help videos including the ModIO manual use outdated software...
« Last Edit: September 16, 2013, 05:15:23 PM by cncbaltar »
Re: WJ200 low and high range hex frequency data
« Reply #21 on: September 16, 2013, 07:21:50 PM »
So digging more and more,  Duh CRC is calculated off of the data that is being sent...

So trying values.  When I send the following data:

SlaveAddr: 1
StarC: 0
NumCoils:1
Data: FF00

The following gets transmitted 01 05 00 00 FF 00 8C 3A  just as sinji saw in his early creation of this thread
Stupid manual show the CRC code as 8C A3  I am guessing it is simply a typo, however I still have no functionality over modbus..

The manual definitely appears to be a copy of the X200 manual which really helps nobody...  Sinji or bloomingtonmike I would love to hear from you how you got yours working I just purchased the serial converter that Bloomingtonmike mentioned below hopefully that will resolve my issue if it is simply an incompatibility issue that I have seen from a couple other threads..

I know this is an old thread but I hope somebody out there is still working with WJ200 VFDs with modbus.


Re: WJ200 low and high range hex frequency data
« Reply #22 on: September 17, 2013, 03:42:05 PM »
Hi. Yep still here.

The WJ200 does not use the RJ45 port for modbus - it uses the two pins as noted in the manual. That $5 rs232-to rs485 adapter and a two conductor wire should be all you need.

I have it working via modbus and mach but the brains file needs work to control the 60hz motor I have. You might be fine with a spindle that is 400hz.
Re: WJ200 low and high range hex frequency data
« Reply #23 on: September 17, 2013, 04:14:41 PM »
Hi. Yep still here.

The WJ200 does not use the RJ45 port for modbus - it uses the two pins as noted in the manual. That $5 rs232-to rs485 adapter and a two conductor wire should be all you need.

I have it working via modbus and mach but the brains file needs work to control the 60hz motor I have. You might be fine with a spindle that is 400hz.

iam NOT using the RJ45 port.. I am using a USB->RS485 (two wire)  I am using it the same way you are can you tell me exactly what you used to test your setup if it is Mach3 what did you type into your data section of the TestModBus window?

Here is how I have mine hooked up:
A+ on USB->RS485 adapter to SP on the Hitachi WJ200
B- on USB->RS485 adapter to SN on Hitachi WJ200
GND on USB->RS485 adapter to GND on Hitachi WJ200
Re: WJ200 low and high range hex frequency data
« Reply #24 on: September 17, 2013, 04:22:11 PM »
You cannot use a USB to RS-485 adapter.
I never used or recommended one.

You need a 9 pin serial RS-232 - RS-485 adapter.

Re: WJ200 low and high range hex frequency data
« Reply #25 on: September 17, 2013, 04:31:01 PM »
You cannot use a USB to RS-485 adapter.
I never used or recommended one.

You need a 9 pin serial RS-232 - RS-485 adapter.

Sorry I should have been more specific Sinji and several other threads have used USB however nobody seems to respond to those threads.  I realize you used RS232 to RS485.  I will try that today as mine should arrive this afternoon but I would still like to know what you typed into the Test window...

The data formats are not clearly documented ANYWHERE... and it seems only a select few have typed the right thing to see communication.  Maybe my problem is the USB to RS485 converter but I would like to confirm the data itself if possible.
Re: WJ200 low and high range hex frequency data
« Reply #26 on: September 17, 2013, 07:35:16 PM »
Your data will be different than anyone else depending on whats in your registers.

First open the comm - if it says no error you are communicating. Then select holding coils and read 8 of them. You will see their output on the right.

If you have it working and load sinji's brain. Type M3 and you will see the motor start up.

Re: WJ200 low and high range hex frequency data
« Reply #27 on: September 18, 2013, 03:34:39 AM »
Quote
Your data will be different than anyone else depending on whats in your registers.

Actually maybe you miss understood me I am trying to under stand exactly what you are writing to the WJ200 from Mach3 via Modbus communication.  Lets say turning on/off the spindle which is a single Coil, and I assume On for you is FF00 Off is 0000. 
We are both using a spindle and we are both using the WJ200 and we are both using Mach3   Settings for this should be identical.

Quote
First open the comm - if it says no error you are communicating. Then select holding coils and read 8 of them. You will see their output on the right.

Ok it says no error but all this means is that Mach3 was able to open the comm port which mine says "no error"  But when I try and read or write I get a "time out" error so that means it is not actually reading or writing the data to/from the WJ200.

I have tried BOTH:
USB -> RS485 -> WJ200 via 2 wire interface

RS232 -> RS485 ->WJ200 via 2 wire interface  (I purchased the exact converter you are using and that you linked to in your post)


Basically at this point I am 95% sure that my WJ200 is NOT working via modbus communication.. It does function as expected if I do everything manually with the keypad on the WJ200.

Can you save and post a configuration file of your WJ200 so I can do a file compare to mine?  Maybe I just need to reset everything and start from scratch?

Re: WJ200 low and high range hex frequency data
« Reply #28 on: January 11, 2014, 04:43:05 PM »
Made some progress on the coil writing issue.

From modbus test window if I write to coil 0 this value "FF00" the spindle turns ON and if I write "0" or "0000" the spindle turns OFF.
What I found is that the manual for X200 drive seems to be wrong bacause for X200 I could write "1" and "0" to turn ON and OFF.  The modbus section of both manuals is pretty much the same in fact WJ200 manual has X200 references which shows that the section was copied and edited but not carefully checked.

Anyway, now the question is how do I write FF00 to coil1?
I used the serial port monitor to see what message is going out to the drive when I turn ON the spindle from test window.  That message is:
01 05 00 00 FF 00 8C 3A
and to turn OFF:
01 05 00 00 00 00 CD CA

So from test window function 05 is used to write to the coil.
When I setup modbus and brain to write to the same coil, function 0F is used. This function writes data in consecutive coils vs. 05 which writes data in a single coil.  This might be O.K. but I can't make the value to come up as FF00.  It looks that there is a binary to HEX conversion when writing to modbus, so I tried writing 255 which equals FF in HEX but no luck, I think the message comes out with a value 00 02

An interesting observation is after I write FF00 to turn ON spindle and then read the current value back I actually get 0001


Sinij,
  I read your conversations in this thread, and also on the Yahoo group.  Thanks for putting in good work on this issue and documenting it.

  I just purchased one of Hitachi's new NE-S1 inverters to replace my chinese VFD that blew up.  At any rate, and I'm configuring Modbus control of the spindle, I ran into the same issues you were having with your WJ200, namely that you cannot write a 1 (0001h) to the first couple coils to enable the drive.  I AM able to start my drive by using FF00 as you suggested. This issue, in my opinion, lies with our Inverters.

  I discovered another workaround that doesn't require a complete reworking of the Brains.  I found that if you tried to write 9 or more coils at a time, then you could successfully write a 0001h to start both coils 0 and 1 to start the inverter.  That means there's a very simple fix to make your the brains for an X200 work with either a WJ200 or a NE-S1.  When you configure Modbus in the Serial Plugin section, you can just modify the Run/Direction config to write to 9 coils.  Then your X200 brains will work as intended.

 Screenshot below.

Re: WJ200 low and high range hex frequency data
« Reply #29 on: January 11, 2014, 04:46:20 PM »
One more slight difference between X200 brains and WJ200 and NE-S1 brains is that the frequency resolution is 0.01Hz, so you have to pass 40000 for 400Hz which is 10 times greater than the 4000 you pass for 400Hz on the X200.

  The simple fix is to add a 10* multiplier into your frequency formulas in those brains.
« Last Edit: January 11, 2014, 04:51:16 PM by tjhanks »