From e1fafe6fea7e8b1395e82acaf820a7f8a4bf6c91 Mon Sep 17 00:00:00 2001 From: MarkRivers Date: Sat, 30 Jan 2010 19:44:58 +0000 Subject: [PATCH] Fixed 2 bugs: added 0.5 second delay after starting detector before executing trajectory to allow detector to actually start; changed last element to put out pulses from endPulses+2 to endPulses+1, was putting out too many pulses --- motorApp/NewportSrc/XPS_trajectoryScan.st | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/motorApp/NewportSrc/XPS_trajectoryScan.st b/motorApp/NewportSrc/XPS_trajectoryScan.st index e401cd66..1f0c6c34 100644 --- a/motorApp/NewportSrc/XPS_trajectoryScan.st +++ b/motorApp/NewportSrc/XPS_trajectoryScan.st @@ -614,6 +614,8 @@ ss xpsTrajectoryRun { /* Start the detector */ detOn = 1; pvPut(detOn); + /* Wait for 0.5 second for detector to actually start */ + epicsThreadSleep(0.5); /* Get start time of execute */ startTime = time(0); /* Call the C function from here so that the main state set can poll */ @@ -815,12 +817,12 @@ static void trajectoryExecute(SS_ID ssId, struct UserVar *pVar) " calling MultipleAxesPVTPulseOutputSet(%d, %s, %d, %d, %f)\n", pVar->pollSocket, pVar->groupName, pVar->startPulses+1, - pVar->endPulses+2, + pVar->endPulses+1, pVar->pulsePeriod); } status = MultipleAxesPVTPulseOutputSet(pVar->pollSocket, pVar->groupName, pVar->startPulses+1, - pVar->endPulses+2, + pVar->endPulses+1, pVar->pulsePeriod); /* Define trigger */