Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portuguese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 20, 2013, 11:27:17 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
Brains Development
Help with Modbus I/O with Brains
Pages:
1
2
»
Go Down
« previous
next »
Author
Topic: Help with Modbus I/O with Brains (Read 4526 times)
0 Members and 1 Guest are viewing this topic.
skippy
Active Member
Offline
Posts: 9
Help with Modbus I/O with Brains
«
on:
January 17, 2011, 09:57:04 AM »
Can someone help and tell me where I' going wrong
Here are my ModBus Configuration Screen
Also I have tested thought the <Test ModBus> button I'm are able to read and write to Coils and Holding Registers but when the brains a running they don't update the VFD coils or Holding Registers.
Also included the two brains VFDrun and VFDspeed screen Snap shoots
I think my problem is when I add the ModBus input or outputs as seen in the Add input screen shot
I'm no sure what setting to us for the following
Enter ModBus Address to use?
I know it's an output when it's and output and input then it's an input
Source?
I have tried all different settings
I have also read the Users_Guide_for_Brains
I think this is where I'm getting stuck is on the follow passage
Quote
ModBus: this is where the money shot is, here you enter the ModBus address to use this is the Local Address starting at 0, (unless in the TCP
config you told it to start at a different Local address for that Cfg). Local Address “0” corresponds to your first “starting
address” of your external device for that Cfg.
As my slave is node 1 and the Address is 0001h for the coil or 001h for the Holding Register why do enter in 0 and when I do it doesn't work ?
Any help would be much appreciated
Regards
Paul (skippy)
ModBus Configuration 170111.jpg
(91.78 KB, 860x560 - viewed 427 times.)
vfdrun 170111.jpg
(36.31 KB, 819x295 - viewed 370 times.)
VFDspeed 170111.brn.jpg
(33.43 KB, 819x295 - viewed 345 times.)
add input 170111.jpg
(23.91 KB, 402x362 - viewed 355 times.)
Logged
Greolt
Global Moderator
Offline
Posts: 896
Re: Help with Modbus I/O with Brains
«
Reply #1 on:
January 17, 2011, 06:32:30 PM »
Paul I am not going to be much help but am very interested to follow your quest.
I have tried so many things that, for the time being, I have given up.
Shouldn't the source be set to "Serial Plugin Enabled"?
Greg
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,777
Briceville, TN, USA
Re: Help with Modbus I/O with Brains
«
Reply #2 on:
January 17, 2011, 10:37:39 PM »
Several things............
1). Please dont take this in a bad way, but re-read the Brains guide...... your missing some concepts there.....
2). Ok, in your Modbus set up dialog, you will need to convert HEX modbus addresses to Decimal addresses (see guide).
Double CHECK your Modbus addresses in your VFD, to make sure you are addressing your IO correclty....
3). Once you can control your VFD (all functions that your trying to control), from the Modbus Test Window, your 1/2 there.
4). Remember this (and it is a little confusing, I admit), the Modbus OUTPUTs from the VFD are the Modbus INPUTS in the modbus dialog window in mach3, and vice versa going the other way......
5). you will need ONE config for each "Type" of modbus you use: I.e. (Input Coils/discrete inputs, Output coils/discrete outputs, holding is holding). If you get it working in the Modbus test window then you have it right.
6). In Brians, if you are using the "Plugin Enabled Serial Modbus" (which in your pics you are), then in Brians you will need to set the modbus protocol type to "Plugin enabled modbus" (you have yours set to something else).
7). NOTE!!!!!!!!!!! when you put in your "start address" for a config, the Local Var starts at "0" not "1", UNLESS you are changing this on purpose........
. Your outputs in Brian MUST also correspond to the matchine config that you choose for you outputs, and again, you must SET the Using Plugin enabled serial modbus!!
9). Critical, and often overlooked thing on Brians...... When ever you edit/modify/create a Brian, you MUST!!!! "Reload all brains", even WHEN you THINK you see your brains name in the list!!!!!, Make sure you have the Enable Brain CHECKED for that new or modded Reloaded Brian!!!!!
10). For testing Purposes, I would HIGHLY, HIGHLY recommend you get some kind of Cheap secondary Computer monitor, so you can run Mach on one screen, and your "View Brain" (from the button of same name), so you can watch the items change state as you test you system, to debug your Brain.
scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Greolt
Global Moderator
Offline
Posts: 896
Re: Help with Modbus I/O with Brains
«
Reply #3 on:
January 18, 2011, 01:29:58 AM »
I have got Mach via modbus to turn the spindle on and off. Yay!!!!! At last!!!
The settings that I ended up with in the brain lobe termination made no sense but they worked.
I am using the X200 for testing, which does not have the removable control panel. This means that the control panel is still connected when the cat5 cable is plugged in. Unlike the SJ200.
So I set the A001 to 00. Which means the potentiometer still controls speed manually. And A002 to 03. which sets modbus to control run command.
This is what I had to do before modbus would turn the spindle on. On the other hand, if A001 was set to 03. (modbus speed control), then run command via modbus would not work.
I presume the reason for this is because the modbus controlled speed is sitting at zero revs. Just as if the pot is turned all the way down.
When I "view brain" I can see the output change with spindle speed override slider. Also, importantly, the return value from VFD goes up and down too.
This says to me that the VFD is getting the speed signal. But it is having no effect.
So am I sending the speed signal to the wrong register or something? I wish I knew. But at least I have some success.
Greg
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,777
Briceville, TN, USA
Re: Help with Modbus I/O with Brains
«
Reply #4 on:
January 18, 2011, 03:55:22 AM »
Quote
So am I sending the speed signal to the wrong register or something? I wish I knew. But at least I have some success.
yes, most likely this is the case....
Here is a few things to look for on your VFD, see how many Bit resolution your speed control input from the modbus is, i.e. 12 bits would be 4095 in decimal. So look at your VFD book, find out how to configure the parameters for Analog speed control over modbus, and make sure you have the Correct address!!!!, in your Mobus dialog, use a seperate config for speed control, it is usualy a holding register, so from modbus in mach, your ana out would be an Output holding register....... On average that is.
Given the above, and assuming lets say that your ana out is on Config 1, and was the first address of that config, same as the start address.
you brain would be:
Spindle Speed % DRO 99 > Formula A * 4095 > Plugin enabled Serial modbus out, config 1, local var 0
Scott
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Greolt
Global Moderator
Offline
Posts: 896
Re: Help with Modbus I/O with Brains
«
Reply #5 on:
January 18, 2011, 08:43:02 PM »
I have made some progress.
Now I can operate the run command, direction command and speed (or frequency) command, all via the "Test Modbus" dialogue.
I had not succeeded with this before, so was getting ahead of myself, playing around with the modbus configuration.
Now I need to translate those commands over to the serial plugin modbus, to be controlled via brains. Run command works no problem. Speed command is where I fall over.
Here are some screen grabs of the "Test Modbus" dialogues with the numbers that work.
Greg
TestCoils.jpg
(57.02 KB, 527x458 - viewed 421 times.)
TestHolding.jpg
(58.64 KB, 527x458 - viewed 332 times.)
Logged
Greolt
Global Moderator
Offline
Posts: 896
Re: Help with Modbus I/O with Brains
«
Reply #6 on:
January 18, 2011, 10:22:58 PM »
So now armed with that information I proceed to set up "Modbus Configuration" as well as the brains to send the appropriate data.
The first configuration (Cfg #0) works fine with the run command brain. No problem there.
The second configuration (Cfg #1) along with its speed control brain is where I am stuck.
Here are a coup[le of relevant pages of the Hitachi manual.
Full manual PDF link, driveswarehouse.com/documentation/Hitachi/SJ200M.pdf
Greg
Hitachi-Coils.jpg
(141.38 KB, 617x576 - viewed 327 times.)
Hitachi-Holding.jpg
(237.1 KB, 629x831 - viewed 250 times.)
«
Last Edit: February 19, 2013, 12:44:20 PM by Chaoticone
»
Logged
Greolt
Global Moderator
Offline
Posts: 896
Re: Help with Modbus I/O with Brains
«
Reply #7 on:
January 18, 2011, 10:30:34 PM »
And here are my Modbus Configuration page and the brain termination dialogue.
Reading the manual it suggests to me that I should be entering 40001 + offset somewhere. But that just gets rejected whenever I try.
And the coil numbers suggests similar (30001 + offset) but clearly works without any reference to any such number.
Seems to me the key info I am getting wrong is the places marked in my pics.
"Modbus Var" on the configuration page "Cfg# 1" (Cfg# 0 works as is)
"Enter Mobus Address to use" on th ebrain termination dilalogue.
MODconfig.jpg
(186.77 KB, 860x567 - viewed 321 times.)
Terminator.jpg
(61.97 KB, 412x368 - viewed 275 times.)
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,777
Briceville, TN, USA
Re: Help with Modbus I/O with Brains
«
Reply #8 on:
January 19, 2011, 12:35:58 AM »
Here is the way I am reading it from the manual:
you will need to set parameter:
A001 = 03
A002 = 03
your modbus port speed is set to:
9600, same in the VFD, but once you get it all working
you could set C071 = 06, and modbus to 19200.
Note: according to how your manual reads, for your digital output coils, your modbus BASE starts at (in the VFD in decimal), at 30001,
so, for your two discrete outputs, you would need your offset plus your base, cnf#0,so Address Modbus (var) would be 30002, 2 registers, output coils (see attached screen shot).
for your spindle speed out, you would use cfg#1, address base is 40001 plus the offset so, start address for where the speed register is, is 40003 and only 1 register since that is the only holding your writing to, output holding type.(see attached screen shot).
in brains, your st brain that handles your do, (note, you CAN put this on ONE brain since you can define the modbus cfg per modbus IO.
so since you have your DO working here is the DA (speed out).
DRO99->Formula(A*4000)->Serial Plugin Modbus, Modbus address to use would be "0" since your output holding is the first (and also the start) address, tick "output", tick "Serial Plugin Enabled", put a #1 in the CFG.
(see second screen shot......)
Save that brain, close the IDE, in mach, RELOAD ALL BRAINS!!!!, highlight your speed output brain, make sure it has the enable tick checked. VIEW BRAIN, so you cna MDI spindle speed and see if you see your run for the speed out, changing.
IF................... I say again IF!!!!! I am reading your manual correclty for the offsets, that should do it, NOTE, make sure you remember to TEST this with the MODBUS config Test window and you match the modbus screen shot., make sure you tick the RUN modbus as well.
scott
Plugin Serial Modbus cfg screen5.png
(41.94 KB, 859x557 - viewed 275 times.)
Brain SPMB Out dialog5.png
(11.76 KB, 400x354 - viewed 254 times.)
Logged
Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Greolt
Global Moderator
Offline
Posts: 896
Re: Help with Modbus I/O with Brains
«
Reply #9 on:
January 19, 2011, 03:57:51 AM »
Scott
Let me say first up that I appreciate very much you taking the time to look at this and respond with suggestions.
Quote
you will need to set parameter:
A001 = 03
A002 = 03
your modbus port speed is set to:
9600, same in the VFD, but once you get it all working
you could set C071 = 06, and modbus to 19200.
Yes I have all that. As i said above, communication has been checked in the "Test Modbus" dialogue. That is all OK.
Quote
Note: according to how your manual reads, for your digital output coils, your modbus BASE starts at (in the VFD in decimal), at 30001,
so, for your two discrete outputs, you would need your offset plus your base, cnf#0,so Address Modbus (var) would be 30002, 2 registers, output coils (see attached screen shot).
for your spindle speed out, you would use cfg#1, address base is 40001 plus the offset so, start address for where the speed register is, is 40003 and only 1 register since that is the only holding your writing to, output holding type.(see attached screen shot).
This is where it gets interesting. I have Mach successfully writing to the coils, with this setting at zero instead of 30,002. See pic in my post above.
When I try the setting to 30,002 as in your modbus config pic. It no longer will write to the coils.
So it is working with zero and will not work with 30,002
Also on looking more, some PDF manuals have no mention of this number, and some do. Go figure.
Quote
DRO99->Formula(A*4000)->Serial Plugin Modbus, Modbus address to use would be "0" since your output holding is the first (and also the start) address,
tick "output", tick "Serial Plugin Enabled", put a #1 in the CFG. (see second screen shot......)
Yeah got all that. I know about reload brains etc.
The only bit that I do not get is
Formula(A*4000)
It is actually
A/6
this gives the correct out put range the VFD needs. 0 to 4000 ( 0 to 400hz )
Greg
Logged
Pages:
1
2
»
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> CS-Lab
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Mach3 Wizards
=> Newfangled Mill Wizard
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...