File size: 2,856 Bytes
39e01c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | {
"name": "CONST_m",
"description": "Constant value block - outputs a fixed constant value",
"category": "Sources",
"blockType": "d",
"tag": "BasicBlock",
"interfaceFunctionName": "CONST_m",
"simulationFunctionName": "cstblk4",
"simulationFunctionType": "C_OR_FORTRAN",
"dependsOnU": 0,
"dependsOnT": 0,
"geometry": {
"x": 0.0,
"y": -10.0,
"width": 40.0,
"height": 40.0
},
"style": "CONST_m",
"parameters": {
"exprs": {
"type": "ScilabString",
"height": 1,
"width": 1,
"values": ["1"],
"description": "The constant value to output"
},
"realParameters": {
"height": 1,
"width": 1,
"values": [1.0]
},
"integerParameters": {
"height": 0,
"width": 0
},
"nbZerosCrossing": {
"value": 0
},
"nmode": {
"value": 0
}
},
"ports": {
"explicitInputs": [],
"explicitOutputs": [
{
"ordering": 1,
"dataType": "REAL_MATRIX",
"dataColumns": 1,
"dataLines": 1,
"initialState": 0.0,
"style": "ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0",
"description": "Constant output value"
}
],
"controls": [],
"commands": []
},
"xmlExample": "<BasicBlock id=\"b1\" parent=\"0:2:0\" interfaceFunctionName=\"CONST_m\" blockType=\"d\" dependsOnU=\"0\" dependsOnT=\"0\" simulationFunctionName=\"cstblk4\" simulationFunctionType=\"C_OR_FORTRAN\" style=\"CONST_m\">\n <ScilabString as=\"exprs\" height=\"1\" width=\"1\">\n <data line=\"0\" column=\"0\" value=\"1\"/>\n </ScilabString>\n <ScilabDouble as=\"realParameters\" height=\"1\" width=\"1\">\n <data line=\"0\" column=\"0\" realPart=\"1.0\"/>\n </ScilabDouble>\n <mxGeometry as=\"geometry\" x=\"50.0\" y=\"50.0\" width=\"40.0\" height=\"40.0\"/>\n</BasicBlock>",
"anomalies": [
"No inputs - pure source block",
"blockType='d' (discrete) not 'c' (continuous)",
"dependsOnU=0 (no input dependency) - standard for source blocks",
"Simplest block - just one parameter (the constant value)"
],
"criticalRules": [
"Outputs the constant value specified in exprs",
"Source block - no inputs only output",
"Can output scalar or matrix constants"
],
"commonUses": [
"Setting fixed gains",
"Reference values",
"Bias offsets",
"Initial conditions"
],
"paramSets": {
"unity": {
"exprs": ["1"],
"value": 1.0
},
"zero": {
"exprs": ["0"],
"value": 0.0
},
"pi": {
"exprs": ["%pi"],
"value": 3.14159
},
"matrix": {
"exprs": ["[1;2;3]"],
"value": [1, 2, 3]
}
},
"relatedBlocks": [
"CONST_f - floating point constant",
"CONST - integer constant",
"STEP_FUNCTION - time-varying source",
"RAMP - ramp source"
]
}
|