Download SL1000 Control API User`s Manual - Electro
Transcript
3.3 Retrieving Device Information Get Unit Group Information int SxGetGroupInfo( SX_HNDL_COMM | SX_HNDL_GROUP hAny, int groupNo,SX_INFO_GROUP *groupinfo ); ERR GetGroupInfo( HNDL hAny, int groupNo, ref INFO_GROUP groupinfo); Description If hAny is a communication handle, this function retrieves the unit group information of the unit group specified by groupNo. If hAny is a unit group handle, this function retrieves the unit group information of the group with that handle. In this case, the groupNo parameter is invalid. Parameters hAny A communication handle or unit group handle groupNoA group number (0 to 15). This parameter is disabled when a unit group handle is specified for hAny. groupinfo Specifies where to store the unit group information. Return Value Returns zero if the function succeeds and a nonzero error code if the function does not succeed. Get Number of Units int SxGetUnitNum( SX_HNDL_COMM hComm, int groupNo, int *unitNum ); ERR GetUnitNum( HNDL hComm, int groupNo, ref int unitNum ); Description Retrieves the number of units in the unit group specified by groupNo. Parameters hComm groupNo unitNum A communication handle A group number (0 to 15) Specifies where to store the unit number Return Value Returns zero if the function succeeds and a nonzero error code if the function does not succeed. 3-8 IM 720320-01E