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 27, 2012, 09:48:42 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
convert modbus CB to brain?
Pages:
1
Go Down
« previous
next »
Author
Topic: convert modbus CB to brain? (Read 664 times)
0 Members and 2 Guests are viewing this topic.
stirling
Global Moderator
Offline
Posts: 1,190
UK
convert modbus CB to brain?
«
on:
May 12, 2011, 12:51:18 PM »
In the CB code below, reg0 and reg1 are both modbus 16 bit registers and it works just fine as a macropump. Can this code snippet be converted into a brain?
reg0 = getInput(0)
reg1 = getInput(1)
if reg0 <> reg1 then
setModOutput(1, reg0)
end if
Thanks
Ian
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: convert modbus CB to brain?
«
Reply #1 on:
May 18, 2011, 07:04:13 AM »
Hey Ian,
Yes it can be done........ maybe........if........ hehehe
I dont have anything hooked up at the moment for the OLD style serial MB, (since your using the vb that accesses it, I am thinking that is what your using).
The Brain that is attached, in THEORY........ should do what you want, with the following caviot.
what it does is this, if SNPMB inputs 0 and 1, are NOT equal that sets the var to true or 1, if equal it is set to 0.
on the second line, I run a formula that will multiply the Var times the input0, so if the rung above is true, then the var
multiplies the input times 1, then sends it out to SNPMB output 1. But if your VAR is 0, i.e. if inputs 0 and 1 above are eqaul
then your output 1 will always be forced to 0............. dont know if that would be a problem for you or not.
scott
IAN_Brain.brn
(3.58 KB - downloaded 42 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/
stirling
Global Moderator
Offline
Posts: 1,190
UK
Re: convert modbus CB to brain?
«
Reply #2 on:
May 19, 2011, 04:44:35 AM »
Hi Scott - thanks for your reply.
I like the cut of your jib sir - that's devious - unfortunately forcing the output to zero if inputs are equal is a problem.
It's kinda become academic in a way because I liked the idea of speeding up the processing frequency - hence Brians - but as it turns out my macropump version seems to work fine so no worries.
All I'm doing is keeping a pendant in synch so that if for example you press cycle start on the pendant and then say feedhold on the standard keyboard, the pendant knows your now in feedhold.
Anyway - thanks again Scott.
Cheers
Ian
Logged
Pages:
1
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...