Chapter 3 Operating Principles | PCI-DMC-A01 / PCI-DMC-B01
Revised March, 2012 3-69
// The Output_value[1] variable will store the value to be output for bit 0 to bit 15 of
Port 1
/* Enable output */
rt = _DMC_01_set_rm_output_active(gDMCCardNo, NodeID, SlotID, Enable);
//This function must be enabled before the output value set above can be outputted
from the output port.
If you wish to get the data you sent through the DO module on the DI side, you must
use the ASD-DMC-RM32MN module and execute the following procedure:
/* Get value of DI Port 0 */
rt = _DMC_01_get_rm_input_value(gDMCCardNo, NodeID, SlotID, 0,
&input_value[0]);
// The Input_value[0] value will return the data from bit 0 to bit 15 of Port 0.
/* Get value of DI Port 1 */
rt = _DMC_01_get_rm_input_value(gDMCCardNo, NodeID, SlotID, 1,
&input_value[1]);
// The Input_value[1] value will return the data from bit 0 to bit 15 of Port 1.
Data cannot be retrieved from Port 0 of ASD-DMC-RM32MN module, as shown in
the following figure. In Port 1 bit 0 is ON and the remaining bits are OFF.
Figure 3.97
6) Maintain output port's output status (value)
To maintain the current output until power to the module is turned off, use the
following procedure:
rt = _DMC_01_set_rm_output_value_error_handle(gDMCCardNo,
gpNodeID[gNodeNum], 0, port, gErrorHandle);
// The port variable can be set to the 2 ports on the remote module. A value of 0
corresponds to Port 0 on the module. A value of 1 corresponds to Port 1. The value
of the gErrorHandle variable determines whether the system should retain the
incorrect output value in the event of an error. If the value is 1, system will retain the
output value until module is powered off or removed; if value is 0, then the incorrect
output will be reset to 0.