Function:
sc5511a_close_device
Definition:
int
sc5511a_close_device
Input:
sc5511a_device_handle_t
Description:
sc5511a_close_device closes the device associated with the device handle and turns off
the "active" LED on the front panel if it is successful.
Example:
Code to exercise the functions that open and close the PXIe device:
#include
// Declaring
#define
sc5511a_device_handle_t *dev_handle;
int
num_of_devices;
char
int
status;
device_list = (char**)malloc(sizeof(char*)*MAXDEVICES);
serial numbers to search
for
(i=0;i<MAXDEVICES; i++)
SCI SN has 8 char
num_of_devices = sc5511a_search_devices(device_list);
SCI for device type
if
(num_of_devices == 0)
{
numbers\n");
}
printf("\n There are %d SignalCore %s USB devices found. \n
num_of_devices, SCI_PRODUCT_NAME);
device_list[i]);
//** sc5511a_OpenDevice, open device 0
dev_handle = sc5511a_open_device(device_list[0]);
// Free memory
//
// Do something with the device
// Close the device
status = sc5511a_close_device(dev_handle);
SC5511A User Manual
(sc5511a_device_handle_t
*dev_handle
"sc5511a.h"
MAXDEVICES 50
// the number of device types found
**device_list;
// 2D to hold serial numbers of the devices found
// status reporting of functions
device_list[i] = (char*)malloc(sizeof(char)*SCI_SN_LENGTH);
printf("No signal core devices found or cannot not obtain serial
for(i = 0; i<MAXDEVICES;i++) free(device_list[i]);
free(device_list);
return
1;
i = 0;
while
( i < num_of_devices)
{
printf("
i++;
}
for(i = 0; i<MAXDEVICES;i++) free(device_list[i]);
free(device_list);
//device handle
Device %d has Serial Number: %s
// Done with the device_list
Rev 1.7.0
dev_handle)
*
(handle to the device to be closed)
// MAXDEVICES
//searches for
\n",
\n", i+1,
//
29
Need help?
Do you have a question about the SC5511A and is the answer not in the manual?