Hello Guest it is September 21, 2023, 06:35:34 PM

Author Topic: Hitachi SJ200 and ModBus Control Problems  (Read 15958 times)

0 Members and 1 Guest are viewing this topic.

Hitachi SJ200 and ModBus Control Problems
« 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)

Offline Greolt

*
  •  956 956
    • View Profile
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #1 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

« Last Edit: January 18, 2011, 06:52:42 PM by Greolt »
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #2 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;
  • PLC Addresses (Base 1)
  • Protocol Addresses (Base 0)

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.
« Last Edit: January 19, 2011, 01:43:06 AM by Peter Homann »
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #3 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)

Offline Greolt

*
  •  956 956
    • View Profile
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #4 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
« Last Edit: January 19, 2011, 03:12:47 AM by Greolt »
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #5 on: January 19, 2011, 03:28:19 AM »
Greg,

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

Cheers,

Peter.
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com

Offline Greolt

*
  •  956 956
    • View Profile
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #6 on: January 19, 2011, 06:53:43 PM »
Got it going.  At last !!

Thanks Peter and Paul.

Greg
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #7 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.
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com

Offline Greolt

*
  •  956 956
    • View Profile
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #8 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
« Last Edit: January 19, 2011, 11:03:44 PM by Greolt »
Re: Hitachi SJ200 and ModBus Control Problems
« Reply #9 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