File size: 3,850 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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | {
"name": "COSBLK_f",
"description": "Cosine function block - computes the cosine of the input signal",
"category": "Math Operations/Trigonometry",
"blockType": "c",
"tag": "BasicBlock",
"interfaceFunctionName": "COSBLK_f",
"simulationFunctionName": "cosblk",
"simulationFunctionType": "DEFAULT",
"dependsOnU": 1,
"dependsOnT": 0,
"geometry": {
"width": 40,
"height": 40
},
"parameters": {
"exprs": {
"height": 0,
"width": 0,
"type": "ScilabDouble"
},
"realParameters": {
"height": 0,
"width": 0,
"type": "ScilabDouble"
},
"integerParameters": {
"height": 0,
"width": 0,
"type": "ScilabDouble"
},
"objectsParameters": {
"type": "ScilabList"
},
"nbZerosCrossing": {
"height": 1,
"width": 1,
"type": "ScilabInteger",
"intPrecision": "sci_int32",
"value": 0
},
"nmode": {
"height": 1,
"width": 1,
"type": "ScilabInteger",
"intPrecision": "sci_int32",
"value": 0
},
"state": {
"height": 0,
"width": 0,
"type": "ScilabDouble"
},
"dState": {
"height": 0,
"width": 0,
"type": "ScilabDouble"
},
"oDState": {
"type": "ScilabList"
},
"equations": {
"type": "ScilabList"
}
},
"ports": {
"explicitInputs": [
{
"ordering": 1,
"dataType": "REAL_MATRIX",
"dataColumns": 1,
"dataLines": -1,
"initialState": 0.0,
"style": "ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0",
"value": ""
}
],
"explicitOutputs": [
{
"ordering": 1,
"dataType": "REAL_MATRIX",
"dataColumns": 1,
"dataLines": -1,
"initialState": 0.0,
"style": "ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0",
"value": ""
}
],
"implicitInputs": [],
"implicitOutputs": [],
"controls": [],
"commands": []
},
"xmlExample": "<BasicBlock id=\"...\" parent=\"...\" interfaceFunctionName=\"COSBLK_f\" blockType=\"c\" dependsOnU=\"1\" dependsOnT=\"0\" simulationFunctionName=\"cosblk\" simulationFunctionType=\"DEFAULT\" style=\"COSBLK_f\">\n <ScilabDouble as=\"exprs\" height=\"0\" width=\"0\"/>\n <ScilabDouble as=\"realParameters\" height=\"0\" width=\"0\"/>\n <ScilabDouble as=\"integerParameters\" height=\"0\" width=\"0\"/>\n <Array as=\"objectsParameters\" scilabClass=\"ScilabList\"/>\n <ScilabInteger as=\"nbZerosCrossing\" height=\"1\" width=\"1\" intPrecision=\"sci_int32\">\n <data line=\"0\" column=\"0\" value=\"0\"/>\n </ScilabInteger>\n <ScilabInteger as=\"nmode\" height=\"1\" width=\"1\" intPrecision=\"sci_int32\">\n <data line=\"0\" column=\"0\" value=\"0\"/>\n </ScilabInteger>\n <ScilabDouble as=\"state\" height=\"0\" width=\"0\"/>\n <ScilabDouble as=\"dState\" height=\"0\" width=\"0\"/>\n <Array as=\"oDState\" scilabClass=\"ScilabList\"/>\n <Array as=\"equations\" scilabClass=\"ScilabList\"/>\n <mxGeometry as=\"geometry\" x=\"0.0\" y=\"-10.0\" width=\"40.0\" height=\"40.0\"/>\n</BasicBlock>",
"anomalies": [
"Empty exprs (height=0,width=0) - no parameters",
"dataLines=-1 for variable-size input/output",
"DEFAULT simulation function type (not C_OR_FORTRAN)",
"Simple trigonometric block with no state"
],
"criticalRules": [
"Use DEFAULT simulationFunctionType",
"Preserve empty parameter structure",
"Output port style must include rotation=0"
],
"commonUses": [
"Signal processing - convert phase to amplitude",
"Oscillator circuits - combine with sine for quadrature",
"Trigonometric calculations",
"Phase-locked loops"
],
"relatedBlocks": [
"SINBLK_f",
"TANBLK_f",
"TrigFun"
]
} |