This function starts the data transfer.
Definition
MSC_STATUS
MSC_Start(
MSC_HANDLE Handle,
unsigned long SndPeriod,
unsigned long DisconnectTimeout,
unsigned long RetryCount,
unsigned long ResponseTimeout
);
Parameter
Handle
Device-Handle, which has been returned by a previous call of the function MSC_OpenDevice.
SndPeriod
[ms] Time-period between two message frames, which will be sent to the device. If the period is smaller than the time is required to get the answer from the device, the next message frame is sent as soon as possible.
DisconnectTimeout
[ms] If no answer from the device is received in this time interval the device notification is set.
RetryCount
Number of retries before a communication error is reported.
ResponseTimeout
[ms] Time interval before a retry is started.
Return value
If successful, MSC_STATUS_SUCCESS will be returned. In case of an error, an error code will be returned.
Comments
Communication will only work, if the data transfer has been started before using this function.
Example values
The following values are appropriate for static measurement and for most dynamic measurements:
SndPeriod = 1
DisconnectTimeout = 500
RetryCount = 10
ResponseTimeout = 75
In order to achieve a short send period, a 1ms Multimedia-Timer must be started in the Windows application. It decreases the Windows Tick-Time from the standard value (15,6ms) to ≤ 1ms. It is suggested to implement the Multimedia-Timer into the application.
All example values are appropriate for a direct Ethernet connection between the PC and the Irinos-System.
See also