Hello Guest it is April 26, 2024, 08:26:39 AM

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

0 Members and 1 Guest are viewing this topic.

WJ200 low and high range hex frequency data
« on: May 18, 2011, 01:20:23 AM »
I had the X200 working fine until I killed it  :-[  I needed to get back to running so I ordered the WJ200 drive thinking that it will be a direct swap with X200 as far as Modbus control goes.  Turns out WJ200 uses slightly different format for some holding registers.  In X200 all I needed to do was to send 0-4000 decimal number to the holding register and that would set the frequency.
In WJ200 that range is 0-40000 due to increased resolution 0.01Hz so this probably why it requires data to be sent in HEX format and split up between two registers (see the picture below)  I also included a picture of an example from the manual that describes what I need to do.
 
How can I convert decimal to HEX in brain and then split the value for two different registers?  Is this even possible in brain?

Link to the manual, pg `342
http://www.hitachi-america.us/supportingdocs/forbus/inverters/Support/WJ200_Instruction_NT325X.pdf

Re: WJ200 low and high range hex frequency data
« Reply #1 on: May 18, 2011, 02:52:34 PM »
After making a post last night I went back to the shop to see how the holding register for frequency is read, to my surprise I discovered that frequency register 0001h was actually being updated properly.  Below is a picture of the brain I'm using to write registers.  The terminator for MOD:0-P:1 gets decimal input, is mach converting it to HEX when it sends it over ModBus?  It looks like that's what is happening.
This seems inconsistent with manual which says that registers 0001h and 0002h needs to be written for frequency.  I can change the register 0001h value and I get frequency set properly in the drive in Hz so that seems to be working it just doesn't make sense to me.

I have a different issue now, I can't seem to be able to control the motor ON OFF.  The brain seems to be set up correctly but I get no response.  I was having problems controlling it through the modbus test window, the data was read fine from both coils and registers but when I try to write it I get "illegal data value" when writing to coils and "unknown error" when writing to registers.  I think I may know why thou.  It probably has to do with 0000h being inaccessible so it cannot be written to.  I will give it a try again with starting coil set to 1 and not 0.

This still doesn't explain why the brain is not controlling the RUN/STOP, but if I get it working through the test window I might realize why.
Re: WJ200 low and high range hex frequency data
« Reply #2 on: May 18, 2011, 07:50:06 PM »
Now I'm really confused  ???.  I verified that I can read and write holding register for the frequency just fine either from modbus test window or using brain that I posted previously.

The problem is with coils.  I can read coils and receive 0 or 0000 I can also write back 0 or 0000 but I get an error when I try to write 1 or 0001.

I have checked and rechecked and rechecked again all the settings associated with modbus everything seems proper.

I tried everything I could think of at this point, all that's left is to beg for help.

Help  :'( help  :'(
Re: WJ200 low and high range hex frequency data
« Reply #3 on: May 19, 2011, 09:42:50 AM »
I did some more testing and still can't find the problem.  Using the serial monitor program I recorded what was sent to the drive.

Writing 0 to coil 0001:   01 05 00 01 00 00 9C 0A  I get no error
Writing 1 to coil 0001:   01 05 00 01 00 01 5D CA I get "unknown error" message and the coil doesn't change

The format looks fine to me.  I'm about to call Hitachi to see if I can get some support.
Re: WJ200 low and high range hex frequency data
« Reply #4 on: May 19, 2011, 11:50:56 AM »
Spoke with Hitachi and was sent the attached document, after reading it everything still seems fine.

The example 3 in the document describes exactly what I am trying to do.

I also downloaded the ProDriveNext drive programing software from Hitachi and will play with that to see if anything jumps at me.
Re: WJ200 low and high range hex frequency data
« Reply #5 on: May 23, 2011, 10:23:09 AM »
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
Re: WJ200 low and high range hex frequency data
« Reply #6 on: August 22, 2011, 08:35:13 AM »
Hi Sinij,

How did you go with your WJ200? did you end up getting it running with modbus? Im curious to hear your findings as i have one of these on order and planning on doing the same.

Re: WJ200 low and high range hex frequency data
« Reply #7 on: August 25, 2011, 09:35:50 AM »
I did make it work after getting help on yahoo group.  There are discrepancies in the Hitachi manual as far as modbus goes.  I'll have to double check, but I think the attached file is my latest brains to make WJ200 work.  I need to grab the actual brains from the machine.  There are curve correction multipliers to make the RPM read correctly for my mill.
Re: WJ200 low and high range hex frequency data
« Reply #8 on: August 25, 2011, 06:50:15 PM »
Thankyou Sinij, ill try it out.
Re: WJ200 low and high range hex frequency data
« Reply #9 on: August 31, 2011, 05:30:55 PM »
Hi Sinij,

would you be able to provide a screen shot of your modbus configuration page in mach please? im struggling a little as the video tut's for mach show the old interface for modbus configuration.
Also did you get a chance to get the updated brain from your cnc machine?

Thanks in Advance

Kind Regards