cml_io.h
来自「美国COPLEY驱动器,程序开发工具之一.」· C头文件 代码 · 共 1,236 行 · 第 1/5 页
H
1,236 行
/// Get the current error mode settings for a group of 8 digital outputs.
/// For each output in the group, a value of 1 will cause the output to take it's
/// programmed error value on a device failure. Setting the mode to 0 will cause
/// the output to hold it's programmed value on failure.
/// @param id Identifies which group of outputs to read.
/// @param value The current error mode setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout8GetErrMode( uint8 id, uint8 &value ){
return sdo.Upld8( IOOBJID_DOUT_8_ERRMODE, id+1, value );
}
/// Set the current error mode settings for a group of 8 digital outputs.
/// For each output in the group, a value of 1 will cause the output to take it's
/// programmed error value on a device failure. Setting the mode to 0 will cause
/// the output to hold it's programmed value on failure.
/// @param id Identifies which group of outputs to effect.
/// @param value The new error mode setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout8SetErrMode( uint8 id, uint8 value ){
return sdo.Dnld8( IOOBJID_DOUT_8_ERRMODE, id+1, value );
}
/// Get the current error value settings for a group of 8 digital outputs.
/// Error values define the state of the output if a device failure occurs.
/// The error value will only be set for those output pins which have an error
/// mode set to 1. Those with error mode set to zero will not be changed by
/// a device failure.
/// @param id Identifies which group of outputs to read.
/// @param value The current error value setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout8GetErrValue( uint8 id, uint8 &value ){
return sdo.Upld8( IOOBJID_DOUT_8_ERRVAL, id+1, value );
}
/// Set the current error value settings for a group of 8 digital outputs.
/// Error values define the state of the output if a device failure occurs.
/// The error value will only be set for those output pins which have an error
/// mode set to 1. Those with error mode set to zero will not be changed by
/// a device failure.
/// @param id Identifies which group of outputs to effect.
/// @param value The new error value setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout8SetErrValue( uint8 id, uint8 value ){
return sdo.Dnld8( IOOBJID_DOUT_8_ERRVAL, id+1, value );
}
/// Return the number of 16-bit groups of outputs available on this device.
/// @param ct The count is returned here. Zero is returned on error.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16GetCt( uint8 &ct ){
ct = 0;
return sdo.Upld8( IOOBJID_DOUT_16_VALUE, 0, ct );
}
virtual const Error *Dout16Write( uint8 id, uint16 value, bool viaSDO=false );
/// Get the current polarity settings for a group of 16 digital outputs.
/// For each output in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of outputs to read.
/// @param value The current polarity setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16GetPol( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DOUT_16_POL, id+1, value );
}
/// Set the current polarity setting for a group of 16 digital outputs.
/// For each output in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of outputs to effect.
/// @param value The new polarity setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16SetPol( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DOUT_16_POL, id+1, value );
}
/// Get the current filter constant settings for a group of 16 digital outputs.
/// For each output in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of outputs to read.
/// @param value The current filter setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16GetFilt( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DOUT_16_FILT, id+1, value );
}
/// Set the current filter constant setting for a group of 16 digital outputs.
/// For each output in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of outputs to effect.
/// @param value The new filter setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16SetFilt( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DOUT_16_FILT, id+1, value );
}
/// Get the current error mode settings for a group of 16 digital outputs.
/// For each output in the group, a value of 1 will cause the output to take it's
/// programmed error value on a device failure. Setting the mode to 0 will cause
/// the output to hold it's programmed value on failure.
/// @param id Identifies which group of outputs to read.
/// @param value The current error mode setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16GetErrMode( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DOUT_16_ERRMODE, id+1, value );
}
/// Set the current error mode settings for a group of 16 digital outputs.
/// For each output in the group, a value of 1 will cause the output to take it's
/// programmed error value on a device failure. Setting the mode to 0 will cause
/// the output to hold it's programmed value on failure.
/// @param id Identifies which group of outputs to effect.
/// @param value The new error mode setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16SetErrMode( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DOUT_16_ERRMODE, id+1, value );
}
/// Get the current error value settings for a group of 16 digital outputs.
/// Error values define the state of the output if a device failure occurs.
/// The error value will only be set for those output pins which have an error
/// mode set to 1. Those with error mode set to zero will not be changed by
/// a device failure.
/// @param id Identifies which group of outputs to read.
/// @param value The current error value setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16GetErrValue( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DOUT_16_ERRVAL, id+1, value );
}
/// Set the current error value settings for a group of 16 digital outputs.
/// Error values define the state of the output if a device failure occurs.
/// The error value will only be set for those output pins which have an error
/// mode set to 1. Those with error mode set to zero will not be changed by
/// a device failure.
/// @param id Identifies which group of outputs to effect.
/// @param value The new error value setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout16SetErrValue( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DOUT_16_ERRVAL, id+1, value );
}
/// Return the number of 32-bit groups of outputs available on this device.
/// @param ct The count is returned here. Zero is returned on error.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32GetCt( uint8 &ct ){
ct = 0;
return sdo.Upld8( IOOBJID_DOUT_32_VALUE, 0, ct );
}
virtual const Error *Dout32Write( uint8 id, uint32 value, bool viaSDO=false );
/// Get the current polarity settings for a group of 32 digital outputs.
/// For each output in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of outputs to read.
/// @param value The current polarity setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32GetPol( uint8 id, uint32 &value ){
return sdo.Upld32( IOOBJID_DOUT_32_POL, id+1, value );
}
/// Set the current polarity setting for a group of 32 digital outputs.
/// For each output in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of outputs to effect.
/// @param value The new polarity setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32SetPol( uint8 id, uint32 value ){
return sdo.Dnld32( IOOBJID_DOUT_32_POL, id+1, value );
}
/// Get the current filter constant settings for a group of 32 digital outputs.
/// For each output in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of outputs to read.
/// @param value The current filter setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32GetFilt( uint8 id, uint32 &value ){
return sdo.Upld32( IOOBJID_DOUT_32_FILT, id+1, value );
}
/// Set the current filter constant setting for a group of 32 digital outputs.
/// For each output in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of outputs to effect.
/// @param value The new filter setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32SetFilt( uint8 id, uint32 value ){
return sdo.Dnld32( IOOBJID_DOUT_32_FILT, id+1, value );
}
/// Get the current error mode settings for a group of 32 digital outputs.
/// For each output in the group, a value of 1 will cause the output to take it's
/// programmed error value on a device failure. Setting the mode to 0 will cause
/// the output to hold it's programmed value on failure.
/// @param id Identifies which group of outputs to read.
/// @param value The current error mode setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32GetErrMode( uint8 id, uint32 &value ){
return sdo.Upld32( IOOBJID_DOUT_32_ERRMODE, id+1, value );
}
/// Set the current error mode settings for a group of 32 digital outputs.
/// For each output in the group, a value of 1 will cause the output to take it's
/// programmed error value on a device failure. Setting the mode to 0 will cause
/// the output to hold it's programmed value on failure.
/// @param id Identifies which group of outputs to effect.
/// @param value The new error mode setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32SetErrMode( uint8 id, uint32 value ){
return sdo.Dnld32( IOOBJID_DOUT_32_ERRMODE, id+1, value );
}
/// Get the current error value settings for a group of 32 digital outputs.
/// Error values define the state of the output if a device failure occurs.
/// The error value will only be set for those output pins which have an error
/// mode set to 1. Those with error mode set to zero will not be changed by
/// a device failure.
/// @param id Identifies which group of outputs to read.
/// @param value The current error value setting of the output lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32GetErrValue( uint8 id, uint32 &value ){
return sdo.Upld32( IOOBJID_DOUT_32_ERRVAL, id+1, value );
}
/// Set the current error value settings for a group of 32 digital outputs.
/// Error values define the state of the output if a device failure occurs.
/// The error value will only be set for those output pins which have an error
/// mode set to 1. Those with error mode set to zero will not be changed by
/// a device failure.
/// @param id Identifies which group of outputs to effect.
/// @param value The new error value setting of the output lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Dout32SetErrValue( uint8 id, uint32 value ){
return sdo.Dnld32( IOOBJID_DOUT_32_ERRVAL, id+1, value );
}
//@}
/***************************************************************************/
/** \name Analog input control
If the module contains analog inputs, these methods may be used to configure
and read those inputs.
Most manufacturers support 16-bit access to analog inputs. Other input sizes
are optional in the spec. and may or may not be available.
*/
/**
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?