Machsupport Forum

Third party software and hardware support forums. => Modbus => Topic started by: skippy on January 17, 2011, 08:53:47 AM

Title: Hitachi SJ200 and ModBus Control Problems
Post by: skippy on January 17, 2011, 08:53:47 AM
I have being trying to get the Hitachi SJ200 VFD working with ModBus and a Spindle. I have the unit working with no problems with the keypad, start stop the spindle and any speed set with the pot. Now if I connect it by ModBus with in Mach3 Config ModBus the <Test ModBus> I'm able to write and read both Coils and Holding Registers with no problems except when issue the coil 0001h Run command and the 0002h Direction Command the VFD goes into Alarm mode. and needs to be reset to clear the Alarm code.

The only Settings change are A001 and A002 to 03 so that it's now using ModBus and the 485 switch has been selected.

SJ200 VFD Settings
A001 = 03   Frequency Source Setting
A002 = 03   Run Command Source Setting
A003 = 400  Base Frequency Setting
A004 = 400  Maximum Frequency Setting
A044 = 00   V/f Characteristic curve Selection
A082 = 220  AVR Voltage Select
C071 = 06   Communication Speed Selection
C072 = 1    Node Allocation
C074 = 0    Communication Parity Selection
C075 = 1    Communication Stop Bit Selection
C076 = 02   Communication Error Selection
C078 = 50   Communication Wait Time

Any help would be much appreciated
Regards
Paul (skippy)
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Greolt on January 18, 2011, 06:50:03 PM

I have being trying to get the Hitachi SJ200 VFD working with ModBus and a Spindle.
I have the unit working with no problems with the keypad, start stop the spindle and any speed set with the pot.
Now if I connect it by ModBus with in Mach3 Config ModBus the <Test ModBus> I'm able to write and read both Coils and Holding Registers with no
problems except when issue the coil 0001h Run command and the 0002h Direction Command the VFD goes into Alarm mode. and needs to be reset to clear the Alarm code.


This topic is getting spread out across a few threads.  However my post relates particularly to Paul's post above.

I admit I might be confused but it seems to me that there is some inconsistency with register/coil numbering.  This issue of triggering a alarm is related, I believe.

The Hitachi manual says the following,

List of coil numbers,

0000h  -  Reserved
0001h  -  Run Command
0002h  -  FW/REV Command
0003h  -  External Trip  (alarm mode)

But when I enter the coil data in this manner in the "Test Modbus" dilalogue it must be entered as shown in the picture below,  CoilNumbers.jpg

This to my mind does not align with the Hitachi manual.      

So what this means is, when you send a "1" to the third coil in the list, thinking that you are sending a direction command, you are actually sending an external trip command.

Greg

Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Peter Homann on January 19, 2011, 01:37:52 AM
Greg, Skippy,


You you need to read the Modbus specs to understand what is going on, but to summarise there are 2 types of representing Modbus addresses. They are;

They are different ways to represent the same data.

Protocol Addresses Base 0 addresses are the actual data offset. So for coils address 0 accesses the data for the first coil. address 1 accesses the data for the 2nd coil, etc.

For PLC addresses Base 1, Coil addresses start at at address 0001.



And.... Mach3 uses Protocol addressing base 0. Therefore, to access address0001 on the X200 you use the address 0000 as that accesses the first coil.

Clear as mud? :)




Anyway, that's what I think is going on. The attached image from the spec shows the mapping from protocol to PLC addresses.

Cheers,

Peter.
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: skippy on January 19, 2011, 01:59:06 AM
Greg

I split the post up to keep the post to their dedicated discussion topics so the it easier for other people find when they look for resolution  to their problems.


Thanks for the tip will try it out on the weekend  on the coil addressing.

Also when writing to a Holding Registers I can write to one register at a time if I try to do anymore I get a timeout error in Test ModBus this is a probable solution to your problem in setting Holding Registers.

Regards

Paul (skippy)
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Greolt on January 19, 2011, 02:59:32 AM

Also when writing to a Holding Registers I can write to one register at a time if I try to do anymore I get a timeout
error in Test ModBus this is a probable solution to your problem in setting Holding Registers.


Paul

Yes it took me much longer than it should have to figure this out.  

Only write to the one register alone.  Anything more and it will come back as an illegal operation.

I can read as many as I like but write only to the one.  

The next several registers are designated read only in the manual.  I should have caught on earlier.   :)


Peter

Thanks for the diagram.  The one point that threw me (and maybe others) is the Hitachi manual has a 0000h designation.

List of coil numbers,
0000h  -  Reserved
0001h  -  Run Command
0002h  -  FW/REV Command
0003h  -  External Trip  (alarm mode)

But then again I can easily be confused.   :D

Greg
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Peter Homann on January 19, 2011, 03:28:19 AM
Greg,

Presumably 0000h is reserved as it can't be accessed. :)

Cheers,

Peter.
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Greolt on January 19, 2011, 06:53:43 PM
Got it going.  At last !!

Thanks Peter and Paul.

Greg
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Peter Homann on January 19, 2011, 09:55:50 PM
Hi Greg,

Good to hear,

Do you want to publish your setup and brains, etc,

Cheers,

Peter.
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Greolt on January 19, 2011, 11:00:49 PM
It is actually fairly straight forward.  I don't know why it took me such a struggle.  I am not that smart I guess.  :D

Here are pics of the main setup info,

Greg
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: skippy on January 29, 2011, 07:22:15 AM
Update

Got it working today. The Brains worked with no problems. Our mayor problems beside the ones about the VFD Manual not right about the coils offsets was a cheap Chinese USB to RS485 converter we have tried another converter which worked but also gave use Blue screens of death as well. which also had the same chip set as the Commfront adapter both share the same chip and driver. The variation in performance is therefore not centered around these components rather other areas of difference between the two devices. The Commfront device seems to offer additional features including opto-isolation, static protection and in built 120 ohm terminating resistors.
     
This adapter - worked faultlessly. http://www.commfront.com/USB-Serial-Adapters-Converters/Isolated-USB-RS232-RS485-RS422-Converter.htm

Thank you  to all that Helped

Regards skippy
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Sinij kot on May 02, 2011, 05:06:30 PM
Hello, I just got a X200 drive and I'm trying to set it up to run via ModBus.  So far I've had converter problems (I think) and about to try a different converter.
Meanwhile trying to figure out this brain thing which is new to me but I'm excited about it since it allows for nice customization/tweaking.

Could you guys post your working brains as an attachment so I can try it and use it as a starting point.  I have a copy of brains for the router which doesn't have the reverse worked out.  I appreciate it.
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Greolt on May 02, 2011, 09:08:30 PM
I am on holiday.  Anything from me will have to wait till I am home.  Couple of weeks.

Greg
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: Sinij kot on May 03, 2011, 09:49:55 AM
Greg, I followed couple of your thread and actually made some progress.  I have the RPM scaling working and forward spindle rotation, but having trouble with reverse spindle rotation.  Looks like in your setup you are not using reverse rotation.

I'll play with the brain some more and see if I can make it work.  I might have just realized what I was doing wrong, I think Skippy, has similar setup to mine and I need to change the brain closer to his setup.
Title: Re: Hitachi SJ200 and ModBus Control Problems
Post by: lukejenson on March 05, 2012, 01:33:48 PM
Have you looked at their operating instruction manual?

http://www.clrwtr.com/PDF/Hitachi/Hitachi-SJ200-VFD-AC-Drives.pdf (http://www.clrwtr.com/PDF/Hitachi/Hitachi-SJ200-VFD-AC-Drives.pdf)

By the way the SJ200 series has been obsolete for a while. Hitachi's new drive series is WJ200.