POUTSUB
モデリング制御プラントの出力を取得します。
使用
<Control_PlantOutput
       id                  = "2"
       label               = "PlantOut"
       num_element         = "2"
       variable_id_list    = "100, 200"
       hold_order          = "2" 
       interpreter         = "Python"
       script_name         = "poutsub.py"
       usrsub_fnc_name     = "POUTSUB" 
       usrsub_param_string = "USER(100, 200)"
     />フォーマット
- Fortranの呼出し構文
- 
                        SUBROUTINE POUTSUB (ID, TIME, PAR, NPAR, IFLAG)
- C/C++の呼出し構文
- 
                        void STDCALL POUTSUB (int *id, double *time, double *par, int *npar, int *iflag)
- Pythonの呼出し構文
- 
                        def POUTSUB(id, time, par, npar, iflag):
- MATLABの呼出し構文
- サポートされていません。
属性
- ID
- [整数]
- TIME
- [倍精度]
- PAR
- [倍精度]
- NPAR
- [整数]
- IFLAG
- [論理]
例
from math import sin, cos, pi
def POUTSUB(id, time, par, npar, iflag):
    print("POUTSUB, input : ", id, time, par, npar, iflag)
    force = []
    for i in range(npar):
        var_id = int(par[i])
        x, errflg = py_sysfnc("VARVAL", var_id)
        force.append(x)
    print("POUTSUB, output : ", force)