Output Settings

Description of the Output Settings component in the Schematic Editor, which sets analog and/or digital outputs with corresponding signals from the model.

Description

The Output Settings component enables signal assignment to analog and/or digital outputs of HIL devices within the Schematic Editor model. All corresponding settings of the analog and/or digital outputs can be set as well.

Once the outputs are set and the model is compiled and loaded, Analog Outputs and Digital Outputs in the Model Settings section in SCADA will be set according to the Output Settings parameters defined in the model.

Properties

• HIL id
• In case multiple devices are connected, this property allows you to select which device should be managed by the Output Settings component. It is only possible to choose signals from the selected device; otherwise, a compilation error will occur.
• It is possible to have multiple Output Settings components referencing the same HIL id. In this case:
• If different signals are set to the same output channel, an error will be reported.
• If the same signals are set to the same output, the compilation will pass but output will be set only once.
• Analog outputs tab
• Name - select an analog output to send data to.
• Signal - selects a signal from the model to send data to the selected analog output. Available signals are Probe, Voltage/Current measurements, RMS Voltage/Current Measurements, Nonlinear Inductor, Battery, PV Panel, Super Capacitor, Single Phase Constant Power Source, Current/Voltage Controlled Current/Voltage Source, and Machine Signals.
• Scaling - factor that should be multiplied by the original signal value to get the desired measured value at the selected analog output.
• Offset - value that should be added to the original signal value to get the desired measured value at the selected analog output.
• Enable Limit - allows voltage limiting. Available only on HIL404, HIL602+, HIL604, and HIL606.
• Lower/Upper Limit - sets limits for voltage.
• Digital outputs tab
• Name - select a digital output to send data to.
• Signal - selects a signal from the model to send data to the selected digital output. Available signals are Digital Probe, comparator outputs of Voltage/Current measurements, PWM Modulator, and Machine Signals.
• Invert - inverts the assigned signals when enabled.

All channels that are set from the Schematic Editor model through the Output Settings component are marked with an icon next to the channel number on the left. By default, these channels are locked. It is possible to unlock them and override the settings imported from the Schematic Editor model in the Model Settings in SCADA.

Output settings from the model can be restored by using the Output Settings Restore button in Analog/Digital Output Settings in SCADA.

Setting Output Settings properties through API

To set Output settings properties through API you will need to define a dictionary with desired values.

For example, if you have a Digital Probe in your model, you can set the Output Settings digital output like this:


output_settings = mdl.get_item("Output Settings", parent=comp_handle, item_type=ITEM_COMPONENT)

digital_dict = {
'do_channel': "1",
'signal': "Digital Probe.value",
'invert': "True"
}
mdl.set_property_value(mdl.prop(output_settings, "digital_outputs"), [digital_dict])


In the case of Voltage measurements, you can set the analog output with:


output_settings = mdl.get_item("Output Settings", parent=comp_handle, item_type=ITEM_COMPONENT)

analog_dict = {
'ao_channel': "1",
'signal': "Va1.Va1.voltage",
'scaling': "300",
'offset' : "0",
'enable_limit' : 'True',
'lower_limit' : "-100",
'upper_limit': "100"
}
mdl.set_property_value(mdl.prop(output_settings, "analog_outputs"), [analog_dict])


A special case of Voltage measurements is when the fullbandwidth option is enabled and you want to set multiple analog outputs at once. Then, you can set the analog output as follows:


output_settings = mdl.get_item("Output Settings", parent=comp_handle, item_type=ITEM_COMPONENT)

analog_dict1 = {
'ao_channel': "1",
'signal': "Va1.Va1.fullbandwidth",
'scaling': "300",
'offset' : "0",
'enable_limit' : 'True',
'lower_limit' : "-100",
'upper_limit': "100"
}

analog_dict2 = {
'ao_channel': "2",
'signal': "Va1.Va2.voltage",
'scaling': "300",
'offset' : "0",
'enable_limit' : 'True',
'lower_limit' : "-100",
'upper_limit': "100"
}
mdl.set_property_value(mdl.prop(output_settings, "analog_outputs"), [analog_dict1, analog_dict2])


You can set outputs for machines, for example an Induction Machine with Double Cage, in this way:


output_settings = mdl.get_item("Output Settings", parent=comp_handle, item_type=ITEM_COMPONENT)

analog_dict = {
'ao_channel': "1",
'signal': "indm machine.Stator.i_a.current",
'scaling': "300",
'offset' : "0",
'enable_limit' : 'True',
'lower_limit' : "-100",
'upper_limit': "100"
}
mdl.set_property_value(mdl.prop(output_settings, "analog_outputs"), [analog_dict])


A special case of setting outputs for machines involves electrical and mechanical signals. In this case, you can try:


output_settings = mdl.get_item("Output Settings", parent=comp_handle, item_type=ITEM_COMPONENT)

analog_dict1 = {
'ao_channel': "1",
'signal': "indm machine.Machine Wrapper1.i_als",
'scaling': "300",
'offset' : "0",
'enable_limit' : 'True',
'lower_limit' : "-100",
'upper_limit': "100"
}

analog_dict2 = {
'ao_channel': "2",
'signal': "indm machine.Machine Wrapper1.mechanical speed",
'scaling': "300",
'offset' : "0",
'enable_limit' : 'True',
'lower_limit' : "-100",
'upper_limit': "100"
}
mdl.set_property_value(mdl.prop(output_settings, "analog_outputs"), [analog_dict1, analog_dict2])