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
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 28, 2012, 11:22:14 AM
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
Howto send DRO Axis information?
Pages:
1
2
»
Go Down
« previous
next »
Author
Topic: Howto send DRO Axis information? (Read 6053 times)
0 Members and 1 Guest are viewing this topic.
abacus
Active Member
Offline
Posts: 4
Howto send DRO Axis information?
«
on:
January 08, 2008, 06:52:50 AM »
Hi @all,
I've just startet using brains but my MPG allready works. Now I want to send the current axis position to my Modbus device but I don't know how.
My test brain uses Mach3 DRO's "842-X Position" as input, a no operation lobe and a Modbus serial plugin enables output terminator. But waht kind of data I get if I get any data?
Thanks, G.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Howto send DRO Axis information?
«
Reply #1 on:
January 08, 2008, 03:42:49 PM »
Here is a screen shot of what you need.
Your X Axis DRO as input, goes though a NOP, then to the Serial Plugin Modbus terminator at configuration 0, address 0 (this will send a 16 bit value out).
In the Serial modbus config set the settings for output holding register and do what ever address translation you need to to drop the value into your PLC or what ever.
scott
modbusdrooutput.png
(43.48 KB, 1078x198 - viewed 853 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/
sams_n
Active Member
Offline
Posts: 13
Re: Howto send DRO Axis information?
«
Reply #2 on:
January 08, 2008, 05:31:52 PM »
Hi Scot ,
i just made a test
in a 16 bit value i can send 2 caracters (ascii) but not , such as "+123,456".
I alsofound the sendstring terminator , but there I only can send text but not a value of a dro.
Best regards
from Austria
Gerhard
Logged
abacus
Active Member
Offline
Posts: 4
Re: Howto send DRO Axis information?
«
Reply #3 on:
January 09, 2008, 04:37:45 AM »
Hi,
Quote
in a 16 bit value i can send 2 caracters (ascii)
This is exact the problem I have. The register contains only the places before the decimal point and it is also limited to 65535 because of the width 16bit registers.
Where is the rest?
Thanks, G.
«
Last Edit: January 09, 2008, 09:23:37 AM by abacus
»
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Howto send DRO Axis information?
«
Reply #4 on:
January 09, 2008, 08:19:59 AM »
The Brain works here, the Terminator shows the DRO value. (click view brain to watch it update).
The value transfer problem may be in how your handeling the date at the Device side.
Define what device your sending to, and data types your using (and what it supports), also if you have to use certian types i.e. holding, register, etc.
BTW: If you are sending to a PLC then remember that you are recieving a DOUBLE.
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/
abacus
Active Member
Offline
Posts: 4
Re: Howto send DRO Axis information?
«
Reply #5 on:
January 09, 2008, 09:19:15 AM »
Hi scott,
Quote
The value transfer problem may be in how your handeling the date at the Device side.
the transfer is device independent. In Modbus configuration dialog Cfg #0 I set Slave #: 2, Adress: 0, # of Registers: 1, Direction: Output-Holding with a refreshrate of 100ms. Mach3 sends only one 16 bit register over Modbus.
Example:
Mach3 X-Axis DRO shows +9.9750 and send "02 06 00 00
00 09
49 FF" over Modbus.
X-Axis DRO = 65535.0000 -> Modbus "02 06 00 00
FF FF
88 49"
X-Axis DRO = 65536.0000 -> Modbus "02 06 00 00
00 00
89 F9"
Thanks, G.
«
Last Edit: January 09, 2008, 09:21:22 AM by abacus
»
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Howto send DRO Axis information?
«
Reply #6 on:
January 09, 2008, 09:30:28 AM »
yes that is the modbus protocol you are seeing.
I am assuming PLC since you havent said what your sending to. ON the PLC side on your com port tick off Hex values not ascii.
In your PLC Drop the number into a register then if from that point you need to change its type do so there. I.e. Load it out, change it to Binary, real, or whatever and then send that value to the display. If you display requires Ascii you may need to change the register value trough an Ascii filter, then to your display.
If your using Peters board, then ask Peter.
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/
sams_n
Active Member
Offline
Posts: 13
Re: Howto send DRO Axis information?
«
Reply #7 on:
January 09, 2008, 10:42:29 AM »
Hi Scott,
in your BrainControl example , mach3 sends 2 Bytes over the modbus using the modbus function 06.
This is very good to see in the examples of abacus.
In older mach3 versions , when we havn't BrainControl , I made the output with a macro in my macropump.
Example:
'*******X-Dro Value to modbus
Display = ""
SVal = Right(" " & Format(GetDro(0), strFmt),9)
Display = "X" & SVal
SetModIOString (1,0,0, Display)
That sends many Bytes (1Byte for 1character) to the modbus , using the modbus function 16.
When I use in BrainControl the sendstring terminator also can send text to the modbus , but I can't
find a way to send a value of a dro using the sendstring terminator.
Thanks, Gerhard
«
Last Edit: January 09, 2008, 10:52:55 AM by sams_n
»
Logged
abacus
Active Member
Offline
Posts: 4
Re: Howto send DRO Axis information?
«
Reply #8 on:
January 09, 2008, 10:45:57 AM »
I fear you do not understand what I mean.
The DROs content is a floting point value , and you need more than one 16bit register to represent this value. But Mach3 sends only one 16bit register.
Forget about HEX, ASCII, Real or Binary - this is the step that folows after Mach3 has transmit the value to the PLC. I can not handle with a value that will not completely transmited.
Thanks, G.
Logged
Peter Homann
ModIO Adviser
Active Member
Offline
Posts: 354
Re: Howto send DRO Axis information?
«
Reply #9 on:
January 11, 2008, 12:46:27 AM »
Quote from: poppabear on January 09, 2008, 09:30:28 AM
yes that is the modbus protocol you are seeing.
I am assuming PLC since you havent said what your sending to. ON the PLC side on your com port tick off Hex values not ascii.
In your PLC Drop the number into a register then if from that point you need to change its type do so there. I.e. Load it out, change it to Binary, real, The or whatever and then send that value to the display. If you display requires Ascii you may need to change the register value trough an Ascii filter, then to your display.
If your using Peters board, then ask Peter.
scott
Scott,
The line;
Quote
X-Axis DRO = 65535.0000 -> Modbus "02 06 00 00 FF FF 88 49"
is a dump of the Modbus data leaving the PC. The slave device has nothing to do with this yet.
The line is showing what is being sent out of the PC. It shows that the Brain is converting 65535.0000 to the integer 65536 (FFFF hex). and is writing it to address 0000. The problem is that this is not what is wanted.
The line
Quote
Mach3 X-Axis DRO shows +9.9750 and send "02 06 00 00 00 09 49 FF" over Modbus
.
Shows that reals are being converted to integers as the decimal part is being truncated.
The line,
Quote
X-Axis DRO = 65536.0000 -> Modbus "02 06 00 00 00 00 89 F9"
Shows that brains can only handle 16 bit integers as 65536 equates to 10000 hex and as such the leading 1 is lost. This is not such an issue as 16 bits is the standard integer size.
Either the brain needs to convert the value to a floating point number that the Modbus slave understands, or the brain needs to convert it to ascii characters that the slave can display. This is what the ModIO would require.
It really comes down to the functionality that Brains can provide. The macropump scripting had a function to convert a string and sent it out via Modbus. Very useful for displaying DRO etc.
I don't think that Brains has anything like this. At this stage the functionality of Brains is very primitive compared to what the MacroPump could do.
To do the ascii conversion in Brains would require a lot of runs just to conver a single DRO.
Cheers,
Peter.
Cheers,
Peter.
Logged
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com/store
email: peter at homanndesigns.com
Pages:
1
2
»
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> 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
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> 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...