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 26, 2012, 02:33:38 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
General Mach Discussion
Display Spindle Temperature on Mach3 ??
Pages:
1
Go Down
« previous
next »
Author
Topic: Display Spindle Temperature on Mach3 ?? (Read 815 times)
0 Members and 2 Guests are viewing this topic.
frogblender
Active Member
Offline
Posts: 13
Display Spindle Temperature on Mach3 ??
«
on:
May 17, 2010, 11:41:05 AM »
I have a USB temperature probe, which writes the temperature to a textfile every 10 seconds.
I want Mach3 to:
1) read the temperature from the textfile and display it in a DRO every 10 seconds.
2) estop if the temperature exceeds some setpoint.
Any ideas how to do this? I'm fluent in vbscripts.
Logged
Hood
Active Member
Online
Posts: 17,344
Carnoustie, Scotland
Re: Display Spindle Temperature on Mach3 ??
«
Reply #1 on:
May 17, 2010, 01:02:41 PM »
Afraid I am the exact opposite to you regards VB but if you can read this text file then all you would need to do is write the VB in the macropump and if it sees the high temp do the E-Stop.
Hood
Logged
BR549
Active Member
Offline
Posts: 2,551
Re: Display Spindle Temperature on Mach3 ??
«
Reply #2 on:
May 19, 2010, 08:34:10 PM »
Just an idea but from past experiements trying to do a timed loop in VB may tie up a lot of CPU time.
An option would be set up a Brain to do a 10 sec timout loop and set a UserLed on. Then when the simple VB script sees the Led go active THEN it reads the last line of the text file into a variable and then VB can do the compare and act on it.
What does each line of the text file look like?
Just a thought
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Display Spindle Temperature on Mach3 ??
«
Reply #3 on:
May 30, 2010, 03:26:45 AM »
Put this in your macropump, modify the path to where it dumps your USB txt file. Also the script below will only
read and post the FIRST line of data in that file, so make sure each time it updates you file, it only puts the data
in the first line, overwritting any old data there. I used UserDRO 2000 but you can use what ever, just change it.
it ASSUMES that the ONLY thing on that first line is DIGITS!! any none digits will throw an error.
Open "C:\User\MyAccount\Desktop\UsbSpindleTemp.txt" For Input As #1 ' Open to read file.
Line Input #1, FileData ' Read the first line of data.
SetUserDRO(2000, FileData) 'Puts the temp as digits from the 1st line of your txt file.
Close #1
'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/
Zaaephod
Active Member
Offline
Posts: 73
Re: Display Spindle Temperature on Mach3 ??
«
Reply #4 on:
May 31, 2010, 07:00:45 PM »
If you don't require up to the millisecond data, It might be a good idea to use a timer in your macropump script (not a loop) so it only does that file read every few seconds. Otherwise it will be reading that file as fast as it possibly can. Just a thought.
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
Offline
Posts: 1,707
Briceville, TN, USA
Re: Display Spindle Temperature on Mach3 ??
«
Reply #5 on:
June 02, 2010, 02:25:22 AM »
Zaaephod,
has a good point, but it might be easier to do a counter in the macropump, that when it loops through and counts up to 5 (1/2 second), or 10 (one second), it does the read, then resets the counter to Zero, then you dont have the overhead of a VB timer in your macropump, as well.
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/
Zaaephod
Active Member
Offline
Posts: 73
Re: Display Spindle Temperature on Mach3 ??
«
Reply #6 on:
June 02, 2010, 09:11:36 AM »
poppabear,
I considered the same, but I wasn't sure if a macropump ran at a set interval, or if it was dependent on CPU speed for its cycle time. I presume by what you said that the macropump, by default, runs at 1/10 second intervals? Is there any way to change the interval for it? If so, I might just change some of my macropump code.
Logged
BR549
Active Member
Offline
Posts: 2,551
Re: Display Spindle Temperature on Mach3 ??
«
Reply #7 on:
June 02, 2010, 09:26:28 AM »
it would be best to set up the timer in a brain to set an led. Sometimes trying to do a timer loop in the macropump causes problems with CPU hogging.
Set the brain to set an LED /on. Then when the macropump sees the LED/ON then do" code whatever" AND set the LED to OFF.
Just a thought
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...