Connects to the drive
Namespace: EAL.InterfacesAssembly: EAL (in EAL.dll) Version: 1.1.5.0 (1.1.5.0)
Syntax
C# |
---|
void Connect( string ipAddress, Nullable<bool> mulipleIp, uint leaseTimeout, uint busyTimeout, uint maxDelay ) |
Visual Basic |
---|
Sub Connect ( ipAddress As String, mulipleIp As Nullable(Of Boolean), leaseTimeout As UInteger, busyTimeout As UInteger, maxDelay As UInteger ) |
Visual C++ |
---|
void Connect( String^ ipAddress, Nullable<bool> mulipleIp, unsigned int leaseTimeout, unsigned int busyTimeout, unsigned int maxDelay ) |
Parameters
- ipAddress
- Type: System..::..String
IP address of the drive
- mulipleIp
- Type: System..::..Nullable<(Of <(<'Boolean>)>)>
Multiple IP
- leaseTimeout
- Type: System..::..UInt32
Requested lease-timeout in milliseconds that the server should use. Default value is 10000. Use uint.MaxValue to disable lease timeouts i.e indicate the server not to handle the lease-timeout. The lease timeout specifies the amount of time after which the server shall shutdown an idle connection to the client.
- busyTimeout
- Type: System..::..UInt32
Requested busy-timeout in milliseconds, the server should use. Default 2000. Use uint.MaxValue to disable busy timeouts. i.e indicate the client not to handle the busy-timeout. The busy timeout specifies the amount of time within which the server should send a response to the client’s request.
- maxDelay
- Type: System..::..UInt32
Application delay in milliseconds. Minimum value is 200 and default value is 500 Lease-timeout will be shortened by this value (before negotiating with the server) considering delay in sending the request from the client to the server. Busy-timeout will be increased by this value (after negotiating with the server) considering delay in getting the response (response to the request or busy response) from the server to the client.
Examples
Synchronous method
Asynchronous method
![]() | |
---|---|
private static void Sample() { using (IEALConnection ealConnection = new EALConnection()) { ealConnection.Connect("192.168.0.10", null, 10000, 2000, 500); // Connects with give least time, default busy timeout,default max delay IAxis axis = ealConnection.Motion.Axes[0]; // Gets axis axis.Movement.Power(false); // Powers-off axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE_PARAMETERIZATION); // Activates to parameterisation mode ealConnection.Initialize(); // Initializes the basic settings axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE); // Activates to Operating mode axis.Movement.Power(true); // Powers-on axis.Movement.Home(); // Executes homing axis.Movement.MoveAbsolute(10000, 400, 100, 100, 0); // Moves the axis to position 10000 axis.Movement.Wait(100000); // Waits until last movement command completes } } |
![]() | |
---|---|
private static void Sample() { using (IEALConnection ealConnection = new EALConnection(true)) // Asynchronous flag is true { ealConnection.Connect("192.168.0.10", null, 10000, 2000, 500); // Connect task, with given least time, default busy timeout, // default max delay will be added to queue IAxis axis = ealConnection.Motion.Axes[0]; // Gets axis axis.Movement.Power(false); // Powers-off task will be added to the queue axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE_PARAMETERIZATION); // Activate parameterisation mode task will be added to queue ealConnection.Initialize(); // Initializes the basic settings task will be added to queue axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE); // Activate Operating mode task will be added to queue axis.Movement.Power(true); // Powers-on task will be added to queue. axis.Movement.Home(); // Homing task will be added to queue. axis.Movement.MoveAbsolute(10000, 400, 100, 100, 0); // Moves the axis to position 10000 // task will be added to queue. axis.Movement.Wait(100000); // Waits until last movement command completes // task will be added to queue. ealConnection.WaitUntilQueueComplete(); // Now it will wait untill all are executed. } } |