forked from epics_driver_modules/motorBase
Changed lf to f formats
This commit is contained in:
@@ -26,7 +26,6 @@ MultipleAxesPVTExecution use Send() insted of SendAndReceive() */
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include "Socket.h"
|
||||
#define DLL _declspec(dllexport)
|
||||
#include "xps_c8_driver.h" /* Renamed by JHK */
|
||||
#define SIZE_BUFFER 256
|
||||
|
||||
@@ -814,7 +813,7 @@ int __stdcall GPIOAnalogSet (int SocketIndex, int NbElements, char * GPIONameLis
|
||||
sprintf (ExecuteMethod, "GPIOAnalogSet (");
|
||||
for (int i = 0; i < NbElements; i++)
|
||||
{
|
||||
sprintf (temp, "%s,%lf", stringArray0[i], AnalogOutputValue[i]);
|
||||
sprintf (temp, "%s,%f", stringArray0[i], AnalogOutputValue[i]);
|
||||
strcat (ExecuteMethod, temp);
|
||||
if ((i + 1) < NbElements)
|
||||
{
|
||||
@@ -1087,7 +1086,7 @@ int __stdcall GroupHomeSearchAndRelativeMove (int SocketIndex, char * GroupName,
|
||||
sprintf (ExecuteMethod, "GroupHomeSearchAndRelativeMove (%s,", GroupName);
|
||||
for (int i = 0; i < NbElements; i++)
|
||||
{
|
||||
sprintf (temp, "%lf", TargetDisplacement[i]);
|
||||
sprintf (temp, "%f", TargetDisplacement[i]);
|
||||
strcat (ExecuteMethod, temp);
|
||||
if ((i + 1) < NbElements)
|
||||
{
|
||||
@@ -1140,7 +1139,7 @@ int __stdcall GroupJogParametersSet (int SocketIndex, char * GroupName, int NbEl
|
||||
sprintf (ExecuteMethod, "GroupJogParametersSet (%s,", GroupName);
|
||||
for (int i = 0; i < NbElements; i++)
|
||||
{
|
||||
sprintf (temp, "%lf,%lf", Velocity[i], Acceleration[i]);
|
||||
sprintf (temp, "%f,%f", Velocity[i], Acceleration[i]);
|
||||
strcat (ExecuteMethod, temp);
|
||||
if ((i + 1) < NbElements)
|
||||
{
|
||||
@@ -1359,7 +1358,7 @@ int __stdcall GroupMoveAbsolute (int SocketIndex, char * GroupName, int NbElemen
|
||||
sprintf (ExecuteMethod, "GroupMoveAbsolute (%s,", GroupName);
|
||||
for (int i = 0; i < NbElements; i++)
|
||||
{
|
||||
sprintf (temp, "%lf", TargetPosition[i]);
|
||||
sprintf (temp, "%f", TargetPosition[i]);
|
||||
strcat (ExecuteMethod, temp);
|
||||
if ((i + 1) < NbElements)
|
||||
{
|
||||
@@ -1399,7 +1398,7 @@ int __stdcall GroupMoveRelative (int SocketIndex, char * GroupName, int NbElemen
|
||||
sprintf (ExecuteMethod, "GroupMoveRelative (%s,", GroupName);
|
||||
for (int i = 0; i < NbElements; i++)
|
||||
{
|
||||
sprintf (temp, "%lf", TargetDisplacement[i]);
|
||||
sprintf (temp, "%f", TargetDisplacement[i]);
|
||||
strcat (ExecuteMethod, temp);
|
||||
if ((i + 1) < NbElements)
|
||||
{
|
||||
@@ -1744,7 +1743,7 @@ int __stdcall PositionerAnalogTrackingPositionParametersSet (int SocketIndex, ch
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerAnalogTrackingPositionParametersSet (%s,%s,%lf,%lf,%lf,%lf)", PositionerName, GPIOName, Offset, Scale, Velocity, Acceleration);
|
||||
sprintf (ExecuteMethod, "PositionerAnalogTrackingPositionParametersSet (%s,%s,%f,%f,%f,%f)", PositionerName, GPIOName, Offset, Scale, Velocity, Acceleration);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -1817,7 +1816,7 @@ int __stdcall PositionerAnalogTrackingVelocityParametersSet (int SocketIndex, ch
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerAnalogTrackingVelocityParametersSet (%s,%s,%lf,%lf,%lf,%d,%lf,%lf)", PositionerName, GPIOName, Offset, Scale, DeadBandThreshold, Order, Velocity, Acceleration);
|
||||
sprintf (ExecuteMethod, "PositionerAnalogTrackingVelocityParametersSet (%s,%s,%f,%f,%f,%d,%f,%f)", PositionerName, GPIOName, Offset, Scale, DeadBandThreshold, Order, Velocity, Acceleration);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -1875,7 +1874,7 @@ int __stdcall PositionerBacklashSet (int SocketIndex, char * PositionerName, dou
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerBacklashSet (%s,%lf)", PositionerName, BacklashValue);
|
||||
sprintf (ExecuteMethod, "PositionerBacklashSet (%s,%f)", PositionerName, BacklashValue);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -1938,7 +1937,7 @@ int __stdcall PositionerCorrectorNotchFiltersSet (int SocketIndex, char * Positi
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersSet (%s,%lf,%lf,%lf,%lf,%lf,%lf)", PositionerName, NotchFrequency1, NotchBandwith1, NotchGain1, NotchFrequency2, NotchBandwith2, NotchGain2);
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorNotchFiltersSet (%s,%f,%f,%f,%f,%f,%f)", PositionerName, NotchFrequency1, NotchBandwith1, NotchGain1, NotchFrequency2, NotchBandwith2, NotchGain2);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2006,7 +2005,7 @@ int __stdcall PositionerCorrectorPIDFFAccelerationSet (int SocketIndex, char * P
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationSet (%s,%d,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainAcceleration);
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIDFFAccelerationSet (%s,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainAcceleration);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2092,7 +2091,7 @@ int __stdcall PositionerCorrectorPIDFFVelocitySet (int SocketIndex, char * Posit
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocitySet (%s,%d,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity);
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIDFFVelocitySet (%s,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2178,7 +2177,7 @@ int __stdcall PositionerCorrectorPIDDualFFVoltageSet (int SocketIndex, char * Po
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageSet (%s,%d,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity, FeedForwardGainAcceleration, Friction);
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIDDualFFVoltageSet (%s,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f)", PositionerName, ClosedLoopStatus, KP, KI, KD, KS, IntegrationTime, DerivativeFilterCutOffFrequency, GKP, GKI, GKD, KForm, FeedForwardGainVelocity, FeedForwardGainAcceleration, Friction);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2270,7 +2269,7 @@ int __stdcall PositionerCorrectorPIPositionSet (int SocketIndex, char * Position
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIPositionSet (%s,%d,%lf,%lf,%lf)", PositionerName, ClosedLoopStatus, KP, KI, IntegrationTime);
|
||||
sprintf (ExecuteMethod, "PositionerCorrectorPIPositionSet (%s,%d,%f,%f,%f)", PositionerName, ClosedLoopStatus, KP, KI, IntegrationTime);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2595,7 +2594,7 @@ int __stdcall PositionerMotionDoneSet (int SocketIndex, char * PositionerName, d
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerMotionDoneSet (%s,%lf,%lf,%lf,%lf,%lf)", PositionerName, PositionWindow, VelocityWindow, CheckingTime, MeanPeriod, TimeOut);
|
||||
sprintf (ExecuteMethod, "PositionerMotionDoneSet (%s,%f,%f,%f,%f,%f)", PositionerName, PositionWindow, VelocityWindow, CheckingTime, MeanPeriod, TimeOut);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2657,7 +2656,7 @@ int __stdcall PositionerPositionCompareSet (int SocketIndex, char * PositionerNa
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerPositionCompareSet (%s,%lf,%lf,%lf)", PositionerName, MinimumPosition, MaximumPosition, PositionStep);
|
||||
sprintf (ExecuteMethod, "PositionerPositionCompareSet (%s,%f,%f,%f)", PositionerName, MinimumPosition, MaximumPosition, PositionStep);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2796,7 +2795,7 @@ int __stdcall PositionerSGammaParametersSet (int SocketIndex, char * PositionerN
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerSGammaParametersSet (%s,%lf,%lf,%lf,%lf)", PositionerName, Velocity, Acceleration, MinimumTjerkTime, MaximumTjerkTime);
|
||||
sprintf (ExecuteMethod, "PositionerSGammaParametersSet (%s,%f,%f,%f,%f)", PositionerName, Velocity, Acceleration, MinimumTjerkTime, MaximumTjerkTime);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2817,7 +2816,7 @@ int __stdcall PositionerSGammaExactVelocityAjustedDisplacementGet (int SocketInd
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerSGammaExactVelocityAjustedDisplacementGet (%s,%lf,double *)", PositionerName, DesiredDisplacement);
|
||||
sprintf (ExecuteMethod, "PositionerSGammaExactVelocityAjustedDisplacementGet (%s,%f,double *)", PositionerName, DesiredDisplacement);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -2884,7 +2883,7 @@ int __stdcall PositionerUserTravelLimitsSet (int SocketIndex, char * PositionerN
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "PositionerUserTravelLimitsSet (%s,%lf,%lf)", PositionerName, UserMinimumTarget, UserMaximumTarget);
|
||||
sprintf (ExecuteMethod, "PositionerUserTravelLimitsSet (%s,%f,%f)", PositionerName, UserMinimumTarget, UserMaximumTarget);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -3073,7 +3072,7 @@ int __stdcall SingleAxisSlaveParametersSet (int SocketIndex, char * GroupName, c
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "SingleAxisSlaveParametersSet (%s,%s,%lf)", GroupName, PositionerName, Ratio);
|
||||
sprintf (ExecuteMethod, "SingleAxisSlaveParametersSet (%s,%s,%f)", GroupName, PositionerName, Ratio);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -3198,7 +3197,7 @@ int __stdcall XYLineArcExecution (int SocketIndex, char * GroupName, char * File
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "XYLineArcExecution (%s,%s,%lf,%lf,%d)", GroupName, FileName, Velocity, Acceleration, ExecutionNumber);
|
||||
sprintf (ExecuteMethod, "XYLineArcExecution (%s,%s,%f,%f,%d)", GroupName, FileName, Velocity, Acceleration, ExecutionNumber);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -3329,7 +3328,7 @@ int __stdcall XYZSplineExecution (int SocketIndex, char * GroupName, char * File
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "XYZSplineExecution (%s,%s,%lf,%lf)", GroupName, FileName, Velocity, Acceleration);
|
||||
sprintf (ExecuteMethod, "XYZSplineExecution (%s,%s,%f,%f)", GroupName, FileName, Velocity, Acceleration);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
@@ -3414,7 +3413,7 @@ int __stdcall EEPROMDACOffsetCIESet (int SocketIndex, int PlugNumber, double DAC
|
||||
char ReturnedValue [SIZE_BUFFER];
|
||||
|
||||
/* Convert to string */
|
||||
sprintf (ExecuteMethod, "EEPROMDACOffsetCIESet (%d,%lf,%lf)", PlugNumber, DAC1Offset, DAC2Offset);
|
||||
sprintf (ExecuteMethod, "EEPROMDACOffsetCIESet (%d,%f,%f)", PlugNumber, DAC1Offset, DAC2Offset);
|
||||
|
||||
/* Send this string and wait return function from controller */
|
||||
/* return function : ==0 -> OK ; < 0 -> NOK */
|
||||
|
||||
Reference in New Issue
Block a user