Home
Downloads
Mach and LazyCam
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
German Forum
Italian Forum
Portugese Forum
Resources
Links
User Reviews
User Videos
Contact Us
CNCZone
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
December 01, 2008, 10:17:08 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
Cubloc, brains and ModIO
Pages:
«
1
2
3
»
Go Down
« previous
next »
Author
Topic: Cubloc, brains and ModIO (Read 2210 times)
0 Members and 2 Guests are viewing this topic.
jimmybondi
Active Member
Offline
Posts: 27
Re: Cubloc, brains and ModIO
«
Reply #10 on:
April 18, 2008, 08:49:28 PM »
vince,
lets give a try :-)
i paste a code snippet of my CB280 - you have to change serveral things like portnumbers
lines i change are *-marked
Const Device = CB405 *changed
Opencom 1,115200,3,80,80 'Open COM1 for MODBUS communication.
Set Modbus 1,1,1 'Mode=RTU, Slave Adress=1, Return Adress=1
Usepin 4,In
Usepin 5,In
Usepin 20,Out
Usepin 21,Out
Set Ladder On
Dim d As Integer
Dim e As Integer
...
Do
LadderScan
_D(12) = Adin(2)
.... your basic code here ...
Loop
**************
small explanaition:
the register _D(12) contains a value betwenn 0 and 1023 - depending of the voltage at ADIn(2) (Pin27 on CB405)
this register can be read as modbus adress 28684 (see pg. 308 on CB-manual - H7000 = D28672
UsePin 4,in = pin 4 is input and readable in Modbus config at adress 4
Usepin 20,out = pin 20 is output and writeable at adress 20
now - lets take output20 of the cubloc for flood coolant as example
in modbus conf write any cfg: (i use 5 in example)
Cfg #5: Enabled
Comment: P20
port/address: 1
Slave: 1
Refresh: 25
modbus address: 20
nr of reg.: 1
direction: output
now go to brain editor - write a brian - name it whatever you want
in it: add an input - select LEDs - and there your choice is 13 - Flood On
activate this LED and add a lobe - in this case: do nothing (no operation) - ok
activate this lobe and press the terminate-button
choose ModBus - in it set address to 0, as output and Serial plugin enabled #cfg 5
save - load - and enjoy
the rest is only a little bit reading (or listen any video which i don't understand)
and a lot of write'n'click
regards Frank
BTW: i don't post my code - nor here neither pn - its a lot of work and i'm really not able to understand the videos ...
i've taken 1 week for learning by doing
Logged
Vince Endter
Active Member
Offline
Posts: 19
Re: Cubloc, brains and ModIO
«
Reply #11 on:
April 18, 2008, 09:08:13 PM »
That's almost exactly what I have, except for the Dim and LadderScan statement. My Brain setup and Modbus setup are the same, see my screen shots above. It does not work. In your example, you lost me at the Dime d, Dim e and Ladderscan statements. Do these have anything to do with the Coolant Brain? I can't try it on my machine computer until Monday. Thanks for the help.
Vince
Logged
jimmybondi
Active Member
Offline
Posts: 27
Re: Cubloc, brains and ModIO
«
Reply #12 on:
April 18, 2008, 09:32:33 PM »
have you tested the communication between Mach3 and CubLoc ?
both directions ?
thats really elementary
Frank
Logged
Vince Endter
Active Member
Offline
Posts: 19
Re: Cubloc, brains and ModIO
«
Reply #13 on:
April 18, 2008, 10:13:34 PM »
Quote from: jimmybondi on April 18, 2008, 09:32:33 PM
have you tested the communication between Mach3 and CubLoc ?
both directions ?
thats really elementary
Frank
Yes, using the test modbus screen, I can read and write to all my inputs and outputs. I can close the mechanical relays on the Cubloc board from the test screen. Monday I will try your code exactly and see if it works. I am thinking I have some simple setting wrong that I don't readily notice.
Vince
Logged
Vince Endter
Active Member
Offline
Posts: 19
Re: Cubloc, brains and ModIO
«
Reply #14 on:
April 21, 2008, 08:20:33 AM »
It's working!!! Thank you Scott and Frank. The problem was I was using the command input and output instead of usepin in and usepin out.
Vince
«
Last Edit: September 15, 2008, 06:49:05 PM by Vince Endter
»
Logged
Vince Endter
Active Member
Offline
Posts: 19
Re: Cubloc, brains and ModIO
«
Reply #15 on:
April 26, 2008, 09:27:01 PM »
After 3 days of working on it and reading the sparse manual, I was able to write a Cubloc ladder program that will index the CHNC turret to the proper tool (see the attachment). The only thing left to do is have the Cubloc get the tool number from Mach and substitute it for the (Tool#) in the ladder program. It would be nice if the usepin aliases could include a variable that would be linked to an address. Has anyone done this?
Thanks
Vince
ladder.jpg
(37.89 KB, 963x524 - viewed 283 times.)
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Online
Posts: 770
Briceville, TN, USA
Re: Cubloc, brains and ModIO
«
Reply #16 on:
April 27, 2008, 08:28:59 AM »
Drop your Tool number into a "Pointer" if your cube allows that, then compare the Pointer to your rungs and when it is equal to that tool slot, that rung will run and index to that slot.
Your pointer will act like a "Variable" register.
scott
Logged
All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Vince Endter
Active Member
Offline
Posts: 19
Re: Cubloc, brains and ModIO
«
Reply #17 on:
April 27, 2008, 07:09:12 PM »
Thanks Scott, I will go through the manual and see if there is that type of function.
Vince
Logged
Vince Endter
Active Member
Offline
Posts: 19
Re: Cubloc, brains and ModIO
«
Reply #18 on:
April 29, 2008, 01:32:39 PM »
Thanks to all who helped. I now have the tool turret working under Mach control. I had Mach send the tool number to an address in the Cubloc, and then I compared the address to the numbers 1 through 8. If the compare was true, it would execute a subroutine to get that tool position. Here is a video of it working.
http://video.google.com/videoplay?docid=6834017345329403743&hl=en
Vince
Logged
jeep534
Active Member
Offline
Posts: 37
From the hills of WV
Re: Cubloc, brains and ModIO
«
Reply #19 on:
July 24, 2008, 07:48:37 AM »
WoW too cool
archie =) =) =)
Logged
Pages:
«
1
2
3
»
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.
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*e*i*n*g
=> Mach Screens
=> Feature Requests
=> Non English Forums
=> FAQs
===> Finished Plugins for Download
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
-----------------------------
*****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
=> Lazy Cam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> dspMC/IP motion controller
=> Third party software and hardware support forums.
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Promote and discuss your product .
=> Sieg Machines
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
=> One on one phone support.
=> Forum suggestions and report forum problems.
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
Loading...