Let's review how to create a simple Labview program with libximc library using "Ximc simple example.vi".
with device number, whose name we want to find out (one can get total number of found devices by passing the same opaque pointer
to the get_device_count function). Result of the get_device_name function call is a string, which is passed to the open_device function.
This function call sequence is not mandatory (though recommended) - one can manually form device name string and pass it to the
open_device function directly.
Result of the open_device function call is a device handle, or a ximc.h header constant device_undefined, which is returned if libximc
could not open specified device. Device handle is passed to all functions which read data from the controller, write data to the
controller or send commands to the controller, together with appropriate parameters if necessary by function prototype. "Ximc simple
example.vi" calls command_left, command_wait_for_stop and command_stop as an example. After you stop using the controller you
need to close its handle by passing it to the close_device function. After you stop using enumerate_devices result you need to free
allocated memory pointed to by this opaque pointer by passing it to the free_enumerate_devices function (not shown in this example).
Note. Libximc library opens controllers in exclusive access mode. Any controller opened by libximc needs to be closed
before it may be used by another process. Do not stop this Labview example or any other Labview program which
uses libximc with the "Abort execution" button - this doesn't give the running program a chance to call the
close_device() function, thus all open controllers will become locked and inaccessible until you close Labview
environment entirely.
Page 206 / 345
Page 206 / 345
Summary of Contents for 8SMC5-USB
Page 30: ...Linux Page 30 345 Page 30 345 ...
Page 83: ...Connection of magnetic brake to one axis or two axis systems Page 83 345 Page 83 345 ...
Page 87: ...Scheme of buttons connection to the HDB 26 connector Page 87 345 Page 87 345 ...
Page 99: ...Page 99 345 Page 99 345 ...
Page 167: ...Vertical load capacity the maximum vertical load on the stage Page 167 345 Page 167 345 ...
Page 186: ...Click Next Click Continue anyway Page 186 345 Page 186 345 ...
Page 188: ...Page 188 345 Page 188 345 ...
Page 190: ...Page 190 345 Page 190 345 ...
Page 193: ...Page 193 345 Page 193 345 ...
Page 201: ...Select the XILab application in the Programs block Start it Page 201 345 Page 201 345 ...
Page 274: ...7 Files 1 Configuration files 2 Software Page 274 345 Page 274 345 ...
Page 331: ...Motorized Iris Diaphragms 8MID98 Motorized Iris Diaphragm Page 331 345 Page 331 345 ...
Page 338: ...8 Related products 1 Ethernet adapter Page 338 345 Page 338 345 ...
Page 339: ...8 1 Control via Ethernet 1 Overview 2 Administration Page 339 345 Page 339 345 ...