PDA

View Full Version : Problem with setting output, software related...



team08
10-25-2008, 05:37 PM
I am having a problem setting the output in the following file:

'Put Tool in Holder #1
OPEN "C:\SbParts\TC\MONITOR.SBP" FOR OUTPUT AS #1
WRITE #1; "STATUS=BUSY"
CLOSE #1
VD,1,3,0,0,0,1,0,2.54,0,1,1,75,0,8800,4600,0
JS,8,4
MS,3,0.5
ST
SO,1,0
ST
J2,&PRESTAGE1X,&PRESTAGE1Y
JZ,&PUTOOLHEIGHT
PAUSE &DWELLPUTOOL
M2,&TOOL1X-&XADD,&TOOL1Y
SO,2,1
PAUSE .2
MZ,&ABOVEHEIGHT
SO,2,0
J2,&PRESTAGE1X,&PRESTAGE1Y
OPEN "C:\SbParts\TC\MONITOR.SBP" FOR OUTPUT AS #1
WRITE #1; "STATUS=DONE"
CLOSE #1
END

The line in particular is SO,2,1. If I type this command in the console manually, it turns on. I have tried messing with the pause time, and what comes before trying to turn on output 2, but no luck. I tried making this file:

SO,2,1
PAUSE 1
SO,2,0

and it works. I cannot seem to get the output to work in that file for the life of me! The machine pauses and then lifts in the Z axis and finishes the file, completely ignoring the part where it should set output 2. Any suggestions?

dana_swift
10-26-2008, 10:25 AM
There must be some optimization going on in the SB3 parser. That one is particularly interesting as I have never had problems with the discrete outputs, then I never tried to "pulse" them which is what your app does. Discrete 1 turns on the router, I know #1 has "extra logic" associated with it outside the control of the sbp file, such as "wait for the start button". Does #2 have some hidden baggage also?

How about setting an unused discrete, say #5, at the beginning of the file and clearing it at the end? Does that work?

D

ron_moorehead
10-26-2008, 07:01 PM
Is it a type O you have PAUSE .2 in your line above should it be PAUSE 2

team08
10-26-2008, 08:09 PM
I will have to try setting another output. Output 2 in my case is the output to the solenoid that controls the air supply going to the draw bar on the tool changer. It should be releasing the tool. Maybe I will give shopbot a call tomorrow and ask them about it.

I thought maybe it had a problem with the .2, and tried other values in there but no luck. I tried putting the command in twice, and still no luck. Thanks for the suggestions, keep em coming if you have any more!

Gary Campbell
10-26-2008, 08:29 PM
Greg..
Have you checked the relay and connections? My TTL output relay boards have lights that signify when active. Activate output 2 manually and use a digital voltmeter to check that it is actually sending power to the switch.
Gary

team08
11-02-2008, 11:56 AM
Well I think I solved the problem. I put a pause in here:

M2,&TOOL1X-&XADD,&TOOL1Y
PAUSE1 <----(new pause)
SO,2,1
PAUSE .2

I think that maybe the power supply was dragged down just after the previous M2 command and could not turn on the solenoid? So the pause allows a little dwell time before powering the output. I have not looked at it on a scope but it sounds plausible.