[ { "id": "11f8a924.504de7", "type": "tab", "label": "Debager", "disabled": false, "info": "" }, { "id": "8381c865.236028", "type": "subflow", "name": "Single value", "info": "The 'single value' subflow allows to extract data from processing node.\r\n\r\n * Filter Data to extract only one variable after the \"processing node\" step .\r\n * Modify the message to fit with standard widgets such as gauges.\r\n * Limit the number of messages to a maximum of 10 msg per second.\r\n\r\n### **Input**\r\n\r\nThe subflow 'single value' takes in input the `msg.payload`\r\nfrom the processing output. All the messages sent by the processing node have the same structure.\r\n\r\n \"payload\": {\r\n \"groupname\": \"Snapshot2\",\r\n \"variabledata\": [\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n }\r\n ],\r\n \"variablename\": \"int2\"\r\n }\r\n }\r\n\r\n### **Filter on selected variable**\r\nSeveral messages are sent by the processing node for each variable, so the first step of this 'single value' subflow is to filter and keep only messages related to the selected variable.\r\nThe 'filter variable' node will only keep messages with the right `variablename` key.\r\n\r\n### **Extract duplets table**\r\n\r\nThe received message is an Object containing {groupname, variabledata[array], variablename}. \r\nThe array contains two variables :\r\n - `y` the value \r\n - `x` the time\r\n\r\nA single message contains multiple pairs of values extract at a regular time interval.\r\nThe time interval depends on the acquisition frequency.\r\nWith the 'change' node and the `set` property, the `msg.payload` is set to \r\n`msg.payload.variabledata`, only the data variable array is set into msg.payload.\r\n\r\n \"payload\": {\r\n \"variabledata\": [\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n }\r\n ]\r\n }\r\n\r\n### **Split duplets table**\r\n\r\nThe data variable array is split with a length of one in smaller objects by the 'split' node.\r\nEach new object contains two subvariables : `y` and `x`.\r\n\r\n \"payload\": {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n }\r\n\r\n\r\n### **Limit the number of messages**\r\n\r\nThe 'delay' node allows to limit the maximum number of message per second.\r\nIn the 'single value' subflow, one message is extracted per second.\r\n\r\n>_Be careful, a dashboard saturation risk exists if too many messages are received per second._\r\n\r\n### **Extract only y values**\r\n\r\nThe `msg.payload` is set to `msg.payload.y` with the `set` property. \r\nOnly `y` variable is set into msg.payload as single value.\r\n\r\n \"payload\": { \r\n \"y\": \"9\" \r\n }\r\n\r\n### **Output** \r\n\r\nSome widgets such as the gauge and the text node are using the `msg.payload` property. \r\nThe output node is linked to a gauge that allows to see the evolution \r\nof the `y` variable as a function of time.\r\n\r\n\r\n![subflow_gauge](images/subflow_gauge.png)\r\n\r\n### **Details**\r\n\r\nNote : The debug node allows to see clearly and easily the \r\nmessage at the node output. \r\n\r\n\r\n> More details on : [Node-Red](https://nodered.org/docs/user-guide/editor/workspace/subflows)\r\n\r\n\r\n-------\r\n\r\n", "category": "", "in": [ { "x": 40, "y": 60, "wires": [ { "id": "3c5ffe0d.9063b2" } ] } ], "out": [ { "x": 780, "y": 140, "wires": [ { "id": "66397fd3.d8111", "port": 0 } ] } ], "env": [ { "name": "varfilter", "type": "str", "value": "", "ui": { "icon": "font-awesome/fa-filter", "label": { "en-US": "Variable" }, "type": "input", "opts": { "types": [ "str" ] } } } ], "color": "#3CB4E6" }, { "id": "c5c3bd81.8f95f", "type": "subflow", "name": "Mem writer", "info": "", "category": "", "in": [ { "x": 300, "y": 160, "wires": [ { "id": "627e8e20.d4826" } ] } ], "out": [ { "x": 540, "y": 160, "wires": [ { "id": "627e8e20.d4826", "port": 0 } ] } ], "env": [ { "name": "variable", "type": "str", "value": "" } ], "color": "#DDAA99" }, { "id": "9a3c7978.7e4408", "type": "probe", "probeid": "066EFF554954777167033344", "probename": "3752 (...33344)", "protocol": "SWD", "frequency": "1.8 MHz - Default", "probeproperty": "{\"SWD\":[\"4.6 MHz\",\"1.8 MHz - Default\",\"950 kHz\",\"400 kHz\",\"150 kHz\"],\"JTAG\":[\"18 MHz\",\"9 MHz\",\"4.5 MHz\",\"2.25 MHz\",\"1.12 MHz - Default\",\"560 kHz\",\"280 kHz\",\"140 kHz\"]}", "probeversion": "ST Link firmware version V2.J38", "connectionType": "p2p" }, { "id": "46ae54a7.769c3c", "type": "ui_tab", "name": "Debagger", "icon": "dashboard", "disabled": false, "hidden": false }, { "id": "77713318.e1af6c", "type": "ui_base", "theme": { "name": "theme-light", "lightTheme": { "default": "#0094CE", "baseColor": "#0094CE", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": true, "reset": false }, "darkTheme": { "default": "#097479", "baseColor": "#097479", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": false }, "customTheme": { "name": "Untitled Theme 1", "default": "#4B7930", "baseColor": "#4B7930", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" }, "themeState": { "base-color": { "default": "#0094CE", "value": "#0094CE", "edited": false }, "page-titlebar-backgroundColor": { "value": "#0094CE", "edited": false }, "page-backgroundColor": { "value": "#fafafa", "edited": false }, "page-sidebar-backgroundColor": { "value": "#ffffff", "edited": false }, "group-textColor": { "value": "#1bbfff", "edited": false }, "group-borderColor": { "value": "#ffffff", "edited": false }, "group-backgroundColor": { "value": "#ffffff", "edited": false }, "widget-textColor": { "value": "#111111", "edited": false }, "widget-backgroundColor": { "value": "#0094ce", "edited": false }, "widget-borderColor": { "value": "#ffffff", "edited": false }, "base-font": { "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" } }, "angularTheme": { "primary": "indigo", "accents": "blue", "warn": "red", "background": "grey" } }, "site": { "name": "Node-RED Dashboard", "hideToolbar": "false", "allowSwipe": "false", "lockMenu": "false", "allowTempTheme": "true", "dateFormat": "DD/MM/YYYY", "sizes": { "sx": 48, "sy": 48, "gx": 6, "gy": 6, "cx": 6, "cy": 6, "px": 0, "py": 0 } } }, { "id": "cec9f8f4.53e318", "type": "ui_group", "name": "Plotter", "tab": "46ae54a7.769c3c", "order": 1, "disp": true, "width": 12, "collapse": false }, { "id": "7a0f38b6.09f7f8", "type": "exe-config", "name": "exemple_elf", "exefile": "/home/zen/stm32/CubeMonExemple/Debug/CubeMonExemple.elf", "exefolder": "/home/zen/stm32/CubeMonExemple/Debug", "exevariablelist": [ { "address": "0x080027e8", "name": "AHBPrescTable[0]", "type": 1 }, { "address": "0x080027f8", "name": "APBPrescTable[0]", "type": 1 }, { "address": "0x20000000", "name": "delay", "type": 5, "checked": true }, { "address": "0x200000d8", "name": "huart2.ErrorCode", "type": 5 }, { "address": "0x200000d5", "name": "huart2.gState", "type": 2 }, { "address": "0x200000d0", "name": "huart2.hdmarx", "type": 5 }, { "address": "0x200000cc", "name": "huart2.hdmatx", "type": 5 }, { "address": "0x2000009c", "name": "huart2.Init.BaudRate", "type": 5 }, { "address": "0x200000b0", "name": "huart2.Init.HwFlowCtl", "type": 5 }, { "address": "0x200000ac", "name": "huart2.Init.Mode", "type": 5 }, { "address": "0x200000b4", "name": "huart2.Init.OverSampling", "type": 5 }, { "address": "0x200000a8", "name": "huart2.Init.Parity", "type": 5 }, { "address": "0x200000a4", "name": "huart2.Init.StopBits", "type": 5 }, { "address": "0x200000a0", "name": "huart2.Init.WordLength", "type": 5 }, { "address": "0x20000098", "name": "huart2.Instance", "type": 5 }, { "address": "0x200000d4", "name": "huart2.Lock", "type": 2 }, { "address": "0x200000c0", "name": "huart2.pRxBuffPtr", "type": 5 }, { "address": "0x200000b8", "name": "huart2.pTxBuffPtr", "type": 5 }, { "address": "0x200000c8", "name": "huart2.ReceptionType", "type": 5 }, { "address": "0x200000d6", "name": "huart2.RxState", "type": 2 }, { "address": "0x200000c6", "name": "huart2.RxXferCount", "type": 3 }, { "address": "0x200000c4", "name": "huart2.RxXferSize", "type": 3 }, { "address": "0x200000be", "name": "huart2.TxXferCount", "type": 3 }, { "address": "0x200000bc", "name": "huart2.TxXferSize", "type": 3 }, { "address": "0x20000094", "name": "i", "type": 5, "checked": true }, { "address": "0x20000004", "name": "SystemCoreClock", "type": 5 }, { "address": "0x200000dc", "name": "uwTick", "type": 5 }, { "address": "0x2000000c", "name": "uwTickFreq", "type": 2 }, { "address": "0x20000008", "name": "uwTickPrio", "type": 5 }, { "address": "0x20000090", "name": "x", "type": 5, "checked": true } ], "expand": false, "filename": "CubeMonExemple.elf", "exeModifiedTime": 1626891443004, "configLastUpdate": 1626951844983 }, { "id": "f79e05ea.8731f8", "type": "ui_group", "name": "Chart", "tab": "", "order": 1, "disp": true, "width": 15, "collapse": false }, { "id": "be8150dd.766d3", "type": "exe-config", "name": "test", "exefile": "/home/zen/project/stm32/dc_motor_control/build/dc_control.elf", "exefolder": "/home/zen/project/stm32/dc_motor_control/build", "exevariablelist": [ { "address": "0x20000034", "name": "adc", "type": 5, "checked": true }, { "address": "0x20000038", "name": "adc_after", "type": 5, "checked": true }, { "address": "0x08003f24", "name": "AHBPrescTable[0]", "type": 1 }, { "address": "0x08003f34", "name": "APBPrescTable[0]", "type": 1 }, { "address": "0x20000090", "name": "hadc1.DMA_Handle", "type": 5 }, { "address": "0x2000009c", "name": "hadc1.ErrorCode", "type": 5 }, { "address": "0x20000040", "name": "hadc1.Init.ClockPrescaler", "type": 5 }, { "address": "0x20000059", "name": "hadc1.Init.ContinuousConvMode", "type": 2 }, { "address": "0x20000048", "name": "hadc1.Init.DataAlign", "type": 5 }, { "address": "0x20000060", "name": "hadc1.Init.DiscontinuousConvMode", "type": 2 }, { "address": "0x20000074", "name": "hadc1.Init.DMAContinuousRequests", "type": 2 }, { "address": "0x20000054", "name": "hadc1.Init.EOCSelection", "type": 5 }, { "address": "0x20000068", "name": "hadc1.Init.ExternalTrigConv", "type": 5 }, { "address": "0x2000006c", "name": "hadc1.Init.ExternalTrigConvEdge", "type": 5 }, { "address": "0x2000004c", "name": "hadc1.Init.GainCompensation", "type": 5 }, { "address": "0x20000058", "name": "hadc1.Init.LowPowerAutoWait", "type": 2 }, { "address": "0x2000005c", "name": "hadc1.Init.NbrOfConversion", "type": 5 }, { "address": "0x20000064", "name": "hadc1.Init.NbrOfDiscConversion", "type": 5 }, { "address": "0x20000078", "name": "hadc1.Init.Overrun", "type": 5 }, { "address": "0x2000008c", "name": "hadc1.Init.Oversampling.OversamplingStopReset", "type": 5 }, { "address": "0x20000080", "name": "hadc1.Init.Oversampling.Ratio", "type": 5 }, { "address": "0x20000084", "name": "hadc1.Init.Oversampling.RightBitShift", "type": 5 }, { "address": "0x20000088", "name": "hadc1.Init.Oversampling.TriggeredMode", "type": 5 }, { "address": "0x2000007c", "name": "hadc1.Init.OversamplingMode", "type": 2 }, { "address": "0x20000044", "name": "hadc1.Init.Resolution", "type": 5 }, { "address": "0x20000070", "name": "hadc1.Init.SamplingMode", "type": 5 }, { "address": "0x20000050", "name": "hadc1.Init.ScanConvMode", "type": 5 }, { "address": "0x200000a4", "name": "hadc1.InjectionConfig.ChannelCount", "type": 5 }, { "address": "0x200000a0", "name": "hadc1.InjectionConfig.ContextQueue", "type": 5 }, { "address": "0x2000003c", "name": "hadc1.Instance", "type": 5 }, { "address": "0x20000094", "name": "hadc1.Lock", "type": 2 }, { "address": "0x20000098", "name": "hadc1.State", "type": 5 }, { "address": "0x200000d0", "name": "hlpuart1.AdvancedInit.AdvFeatureInit", "type": 5 }, { "address": "0x200000ec", "name": "hlpuart1.AdvancedInit.AutoBaudRateEnable", "type": 5 }, { "address": "0x200000f0", "name": "hlpuart1.AdvancedInit.AutoBaudRateMode", "type": 5 }, { "address": "0x200000dc", "name": "hlpuart1.AdvancedInit.DataInvert", "type": 5 }, { "address": "0x200000e8", "name": "hlpuart1.AdvancedInit.DMADisableonRxError", "type": 5 }, { "address": "0x200000f4", "name": "hlpuart1.AdvancedInit.MSBFirst", "type": 5 }, { "address": "0x200000e4", "name": "hlpuart1.AdvancedInit.OverrunDisable", "type": 5 }, { "address": "0x200000d8", "name": "hlpuart1.AdvancedInit.RxPinLevelInvert", "type": 5 }, { "address": "0x200000e0", "name": "hlpuart1.AdvancedInit.Swap", "type": 5 }, { "address": "0x200000d4", "name": "hlpuart1.AdvancedInit.TxPinLevelInvert", "type": 5 }, { "address": "0x20000134", "name": "hlpuart1.ErrorCode", "type": 5 }, { "address": "0x2000010c", "name": "hlpuart1.FifoMode", "type": 5 }, { "address": "0x2000012c", "name": "hlpuart1.gState", "type": 5 }, { "address": "0x20000124", "name": "hlpuart1.hdmarx", "type": 5 }, { "address": "0x20000120", "name": "hlpuart1.hdmatx", "type": 5 }, { "address": "0x200000ac", "name": "hlpuart1.Init.BaudRate", "type": 5 }, { "address": "0x200000cc", "name": "hlpuart1.Init.ClockPrescaler", "type": 5 }, { "address": "0x200000c0", "name": "hlpuart1.Init.HwFlowCtl", "type": 5 }, { "address": "0x200000bc", "name": "hlpuart1.Init.Mode", "type": 5 }, { "address": "0x200000c8", "name": "hlpuart1.Init.OneBitSampling", "type": 5 }, { "address": "0x200000c4", "name": "hlpuart1.Init.OverSampling", "type": 5 }, { "address": "0x200000b8", "name": "hlpuart1.Init.Parity", "type": 5 }, { "address": "0x200000b4", "name": "hlpuart1.Init.StopBits", "type": 5 }, { "address": "0x200000b0", "name": "hlpuart1.Init.WordLength", "type": 5 }, { "address": "0x200000a8", "name": "hlpuart1.Instance", "type": 5 }, { "address": "0x20000128", "name": "hlpuart1.Lock", "type": 2 }, { "address": "0x20000108", "name": "hlpuart1.Mask", "type": 3 }, { "address": "0x20000110", "name": "hlpuart1.NbRxDataToProcess", "type": 3 }, { "address": "0x20000112", "name": "hlpuart1.NbTxDataToProcess", "type": 3 }, { "address": "0x20000100", "name": "hlpuart1.pRxBuffPtr", "type": 5 }, { "address": "0x200000f8", "name": "hlpuart1.pTxBuffPtr", "type": 5 }, { "address": "0x20000114", "name": "hlpuart1.ReceptionType", "type": 5 }, { "address": "0x20000118", "name": "hlpuart1.RxISR", "type": 5 }, { "address": "0x20000130", "name": "hlpuart1.RxState", "type": 5 }, { "address": "0x20000106", "name": "hlpuart1.RxXferCount", "type": 3 }, { "address": "0x20000104", "name": "hlpuart1.RxXferSize", "type": 3 }, { "address": "0x2000011c", "name": "hlpuart1.TxISR", "type": 5 }, { "address": "0x200000fe", "name": "hlpuart1.TxXferCount", "type": 3 }, { "address": "0x200000fc", "name": "hlpuart1.TxXferSize", "type": 3 }, { "address": "0x20000154", "name": "htim17.Channel", "type": 2 }, { "address": "0x2000017c", "name": "htim17.ChannelNState[0]", "type": 2 }, { "address": "0x20000176", "name": "htim17.ChannelState[0]", "type": 2 }, { "address": "0x20000180", "name": "htim17.DMABurstState", "type": 2 }, { "address": "0x20000158", "name": "htim17.hdma[0]", "type": 5 }, { "address": "0x20000150", "name": "htim17.Init.AutoReloadPreload", "type": 5 }, { "address": "0x20000148", "name": "htim17.Init.ClockDivision", "type": 5 }, { "address": "0x20000140", "name": "htim17.Init.CounterMode", "type": 5 }, { "address": "0x20000144", "name": "htim17.Init.Period", "type": 5 }, { "address": "0x2000013c", "name": "htim17.Init.Prescaler", "type": 5 }, { "address": "0x2000014c", "name": "htim17.Init.RepetitionCounter", "type": 5 }, { "address": "0x20000138", "name": "htim17.Instance", "type": 5 }, { "address": "0x20000174", "name": "htim17.Lock", "type": 2 }, { "address": "0x20000175", "name": "htim17.State", "type": 2 }, { "address": "0x200001a0", "name": "htim2.Channel", "type": 2 }, { "address": "0x200001c8", "name": "htim2.ChannelNState[0]", "type": 2 }, { "address": "0x200001c2", "name": "htim2.ChannelState[0]", "type": 2 }, { "address": "0x200001cc", "name": "htim2.DMABurstState", "type": 2 }, { "address": "0x200001a4", "name": "htim2.hdma[0]", "type": 5 }, { "address": "0x2000019c", "name": "htim2.Init.AutoReloadPreload", "type": 5 }, { "address": "0x20000194", "name": "htim2.Init.ClockDivision", "type": 5 }, { "address": "0x2000018c", "name": "htim2.Init.CounterMode", "type": 5 }, { "address": "0x20000190", "name": "htim2.Init.Period", "type": 5 }, { "address": "0x20000188", "name": "htim2.Init.Prescaler", "type": 5 }, { "address": "0x20000198", "name": "htim2.Init.RepetitionCounter", "type": 5 }, { "address": "0x20000184", "name": "htim2.Instance", "type": 5 }, { "address": "0x200001c0", "name": "htim2.Lock", "type": 2 }, { "address": "0x200001c1", "name": "htim2.State", "type": 2 }, { "address": "0x200001ec", "name": "htim3.Channel", "type": 2 }, { "address": "0x20000214", "name": "htim3.ChannelNState[0]", "type": 2 }, { "address": "0x2000020e", "name": "htim3.ChannelState[0]", "type": 2 }, { "address": "0x20000218", "name": "htim3.DMABurstState", "type": 2 }, { "address": "0x200001f0", "name": "htim3.hdma[0]", "type": 5 }, { "address": "0x200001e8", "name": "htim3.Init.AutoReloadPreload", "type": 5 }, { "address": "0x200001e0", "name": "htim3.Init.ClockDivision", "type": 5 }, { "address": "0x200001d8", "name": "htim3.Init.CounterMode", "type": 5 }, { "address": "0x200001dc", "name": "htim3.Init.Period", "type": 5 }, { "address": "0x200001d4", "name": "htim3.Init.Prescaler", "type": 5 }, { "address": "0x200001e4", "name": "htim3.Init.RepetitionCounter", "type": 5 }, { "address": "0x200001d0", "name": "htim3.Instance", "type": 5 }, { "address": "0x2000020c", "name": "htim3.Lock", "type": 2 }, { "address": "0x2000020d", "name": "htim3.State", "type": 2 }, { "address": "0x20000000", "name": "PWM", "type": 4, "checked": true }, { "address": "0x2000000c", "name": "SystemCoreClock", "type": 5 }, { "address": "0x08003efc", "name": "UARTPrescTable[0]", "type": 3 }, { "address": "0x2000021c", "name": "uwTick", "type": 5 }, { "address": "0x20000004", "name": "uwTickFreq", "type": 5 }, { "address": "0x20000008", "name": "uwTickPrio", "type": 5 } ], "expand": false, "filename": "dc_control.elf", "exeModifiedTime": 1622679643460, "configLastUpdate": 1622679930419 }, { "id": "aa7ed750.430788", "type": "probe", "probeid": "003A002B3038510334333935", "probename": "ST-Link v3-E (...33935)", "protocol": "SWD", "frequency": "24000 kHz", "probeproperty": "{\"SWD\":[\"24000 kHz\",\"8000 kHz\",\"3300 kHz\",\"1000 kHz\",\"200 kHz\",\"50 kHz\",\"5 kHz\"],\"JTAG\":[\"21333 kHz\",\"16000 kHz\",\"12000 kHz\",\"8000 kHz\",\"1777 kHz\",\"750 kHz\"]}", "probeversion": "ST Link firmware version V3.J7", "connectionType": "p2p" }, { "id": "498792bb.a6b75c", "type": "ui_group", "name": "New", "tab": "", "order": 2, "disp": true, "width": "6", "collapse": false }, { "id": "9ceb9cfe.88662", "type": "probe", "probeid": "0666FF383133524157154145", "probename": "ST-Link v2-1B (...54145)", "protocol": "SWD", "frequency": "1.8 MHz - Default", "probeproperty": "{\"SWD\":[\"4.6 MHz\",\"1.8 MHz - Default\",\"950 kHz\",\"400 kHz\",\"150 kHz\"],\"JTAG\":[\"18 MHz\",\"9 MHz\",\"4.5 MHz\",\"2.25 MHz\",\"1.12 MHz - Default\",\"560 kHz\",\"280 kHz\",\"140 kHz\"]}", "probeversion": "ST Link firmware version V2.J37", "connectionType": "p2p" }, { "id": "78515a6.cb5dca4", "type": "exe-config", "name": "test", "exefile": "/home/zen/project/stm32/bldc_winch/build/bldc_winch.elf", "exefolder": "/home/zen/project/stm32/bldc_winch/build", "exevariablelist": [ { "address": "0x080023ec", "name": "AHBPrescTable[0]", "type": 1 }, { "address": "0x080023fc", "name": "APBPrescTable[0]", "type": 1 }, { "address": "0x20000154", "name": "axis0_cur", "type": 6, "checked": true }, { "address": "0x20000158", "name": "axis0_cur_filt", "type": 6, "checked": true }, { "address": "0x2000015c", "name": "axis0_pos", "type": 6, "checked": true }, { "address": "0x20000160", "name": "axis0_vbus_volt", "type": 6, "checked": true }, { "address": "0x20000164", "name": "axis0_vel_filt", "type": 6, "checked": true }, { "address": "0x20000008", "name": "axis0_vel_lim", "type": 6, "checked": true }, { "address": "0x20000168", "name": "axis0_vel_rec", "type": 6, "checked": true }, { "address": "0x2000000c", "name": "cur_req[0]", "type": 1 }, { "address": "0x200002ec", "name": "htim11.Channel", "type": 2 }, { "address": "0x200002f0", "name": "htim11.hdma[0]", "type": 5 }, { "address": "0x200002e8", "name": "htim11.Init.AutoReloadPreload", "type": 5 }, { "address": "0x200002e0", "name": "htim11.Init.ClockDivision", "type": 5 }, { "address": "0x200002d8", "name": "htim11.Init.CounterMode", "type": 5 }, { "address": "0x200002dc", "name": "htim11.Init.Period", "type": 5 }, { "address": "0x200002d4", "name": "htim11.Init.Prescaler", "type": 5 }, { "address": "0x200002e4", "name": "htim11.Init.RepetitionCounter", "type": 5 }, { "address": "0x200002d0", "name": "htim11.Instance", "type": 5 }, { "address": "0x2000030c", "name": "htim11.Lock", "type": 2 }, { "address": "0x2000030d", "name": "htim11.State", "type": 2 }, { "address": "0x20000288", "name": "huart1.ErrorCode", "type": 5 }, { "address": "0x20000285", "name": "huart1.gState", "type": 2 }, { "address": "0x20000280", "name": "huart1.hdmarx", "type": 5 }, { "address": "0x2000027c", "name": "huart1.hdmatx", "type": 5 }, { "address": "0x20000250", "name": "huart1.Init.BaudRate", "type": 5 }, { "address": "0x20000264", "name": "huart1.Init.HwFlowCtl", "type": 5 }, { "address": "0x20000260", "name": "huart1.Init.Mode", "type": 5 }, { "address": "0x20000268", "name": "huart1.Init.OverSampling", "type": 5 }, { "address": "0x2000025c", "name": "huart1.Init.Parity", "type": 5 }, { "address": "0x20000258", "name": "huart1.Init.StopBits", "type": 5 }, { "address": "0x20000254", "name": "huart1.Init.WordLength", "type": 5 }, { "address": "0x2000024c", "name": "huart1.Instance", "type": 5 }, { "address": "0x20000284", "name": "huart1.Lock", "type": 2 }, { "address": "0x20000274", "name": "huart1.pRxBuffPtr", "type": 5 }, { "address": "0x2000026c", "name": "huart1.pTxBuffPtr", "type": 5 }, { "address": "0x20000286", "name": "huart1.RxState", "type": 2 }, { "address": "0x2000027a", "name": "huart1.RxXferCount", "type": 3 }, { "address": "0x20000278", "name": "huart1.RxXferSize", "type": 3 }, { "address": "0x20000272", "name": "huart1.TxXferCount", "type": 3 }, { "address": "0x20000270", "name": "huart1.TxXferSize", "type": 3 }, { "address": "0x200002c8", "name": "huart2.ErrorCode", "type": 5 }, { "address": "0x200002c5", "name": "huart2.gState", "type": 2 }, { "address": "0x200002c0", "name": "huart2.hdmarx", "type": 5 }, { "address": "0x200002bc", "name": "huart2.hdmatx", "type": 5 }, { "address": "0x20000290", "name": "huart2.Init.BaudRate", "type": 5 }, { "address": "0x200002a4", "name": "huart2.Init.HwFlowCtl", "type": 5 }, { "address": "0x200002a0", "name": "huart2.Init.Mode", "type": 5 }, { "address": "0x200002a8", "name": "huart2.Init.OverSampling", "type": 5 }, { "address": "0x2000029c", "name": "huart2.Init.Parity", "type": 5 }, { "address": "0x20000298", "name": "huart2.Init.StopBits", "type": 5 }, { "address": "0x20000294", "name": "huart2.Init.WordLength", "type": 5 }, { "address": "0x2000028c", "name": "huart2.Instance", "type": 5 }, { "address": "0x200002c4", "name": "huart2.Lock", "type": 2 }, { "address": "0x200002b4", "name": "huart2.pRxBuffPtr", "type": 5 }, { "address": "0x200002ac", "name": "huart2.pTxBuffPtr", "type": 5 }, { "address": "0x200002c6", "name": "huart2.RxState", "type": 2 }, { "address": "0x200002ba", "name": "huart2.RxXferCount", "type": 3 }, { "address": "0x200002b8", "name": "huart2.RxXferSize", "type": 3 }, { "address": "0x200002b2", "name": "huart2.TxXferCount", "type": 3 }, { "address": "0x200002b0", "name": "huart2.TxXferSize", "type": 3 }, { "address": "0x20000000", "name": "K_cur", "type": 6 }, { "address": "0x20000004", "name": "K_vel", "type": 6 }, { "address": "0x2000016c", "name": "msg_buff[0]", "type": 1 }, { "address": "0x20000234", "name": "parcer_buff[0]", "type": 1 }, { "address": "0x20000243", "name": "parcer_counter", "type": 1 }, { "address": "0x20000030", "name": "pos_req[0]", "type": 1 }, { "address": "0x20000244", "name": "prog_count", "type": 1 }, { "address": "0x20000245", "name": "rec_buffer", "type": 1 }, { "address": "0x20000246", "name": "req_state", "type": 1 }, { "address": "0x200000c0", "name": "SystemCoreClock", "type": 5 }, { "address": "0x20000248", "name": "torq", "type": 6, "checked": true }, { "address": "0x20000050", "name": "torq_set[0]", "type": 1 }, { "address": "0x200002cc", "name": "uwTick", "type": 5 }, { "address": "0x200000b9", "name": "uwTickFreq", "type": 2 }, { "address": "0x200000bc", "name": "uwTickPrio", "type": 5 }, { "address": "0x20000074", "name": "vel_req[0]", "type": 1 }, { "address": "0x20000094", "name": "vel_set[0]", "type": 1 } ], "expand": false, "filename": "bldc_winch.elf", "exeModifiedTime": 1623318145743, "configLastUpdate": 1623318282105 }, { "id": "3c5ffe0d.9063b2", "type": "switch", "z": "8381c865.236028", "name": "filter variable", "property": "payload.variablename", "propertyType": "msg", "rules": [ { "t": "eq", "v": "varfilter", "vt": "env" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 170, "y": 60, "wires": [ [ "4e5ba7a5.14dec8" ] ] }, { "id": "4e5ba7a5.14dec8", "type": "change", "z": "8381c865.236028", "name": "keep only table of duplets", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload.variabledata", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 430, "y": 60, "wires": [ [ "42bc6ed.5b20d9" ] ] }, { "id": "42bc6ed.5b20d9", "type": "split", "z": "8381c865.236028", "name": "Split a table[1..n] of duplets in n msg of single duplet", "splt": "\\n", "spltType": "str", "arraySplt": 1, "arraySpltType": "len", "stream": false, "addname": "", "x": 800, "y": 60, "wires": [ [ "8b8ddb84.6fb208" ] ] }, { "id": "8b8ddb84.6fb208", "type": "delay", "z": "8381c865.236028", "name": "", "pauseType": "rate", "timeout": "5", "timeoutUnits": "seconds", "rate": "10", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": true, "x": 180, "y": 140, "wires": [ [ "66397fd3.d8111" ] ] }, { "id": "66397fd3.d8111", "type": "change", "z": "8381c865.236028", "name": "keep only value and delete timestamp", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload.y", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 490, "y": 140, "wires": [ [] ] }, { "id": "74708d58.546c24", "type": "acquisition out", "z": "11f8a924.504de7", "name": "STLink out", "probeconfig": "9a3c7978.7e4408", "x": 710, "y": 300, "wires": [] }, { "id": "27206172.05491e", "type": "acquisition in", "z": "11f8a924.504de7", "name": "STLink in", "probeconfig": "9a3c7978.7e4408", "x": 160, "y": 500, "wires": [ [ "bd01bed2.57021" ], [] ] }, { "id": "65677cc0.24a154", "type": "variables", "z": "11f8a924.504de7", "groupname": "Variables", "accesspoint": 0, "execonfig": "7a0f38b6.09f7f8", "variablelist": [], "triggerstartmode": "manual", "triggername": "delay", "triggerthreshold": "", "frequency": "", "frequencyType": "0", "snapshotheader": "", "mode": "direct", "lastImportedTime": 1626951845348, "openStatus": false, "x": 320, "y": 300, "wires": [ [ "74708d58.546c24", "c04b06c8.000128", "efabef3b.72916", "70cb8e2d.974a1" ] ] }, { "id": "1adcf92c.d241e7", "type": "ui_button", "z": "11f8a924.504de7", "name": "", "group": "cec9f8f4.53e318", "order": 3, "width": 3, "height": 1, "passthru": false, "label": "READ", "tooltip": "", "color": "", "bgcolor": "", "icon": "", "payload": "", "payloadType": "str", "topic": "read", "x": 150, "y": 260, "wires": [ [ "65677cc0.24a154" ] ] }, { "id": "b4ef9b15.a2cdd8", "type": "ui_button", "z": "11f8a924.504de7", "name": "", "group": "cec9f8f4.53e318", "order": 1, "width": 4, "height": 1, "passthru": false, "label": "START", "tooltip": "", "color": "", "bgcolor": "", "icon": "", "payload": "", "payloadType": "str", "topic": "start", "x": 140, "y": 300, "wires": [ [ "65677cc0.24a154" ] ] }, { "id": "9330d806.fc2078", "type": "ui_button", "z": "11f8a924.504de7", "name": "", "group": "cec9f8f4.53e318", "order": 2, "width": 4, "height": 1, "passthru": false, "label": "STOP", "tooltip": "", "color": "", "bgcolor": "", "icon": "", "payload": "", "payloadType": "str", "topic": "stop", "x": 150, "y": 340, "wires": [ [ "65677cc0.24a154" ] ] }, { "id": "bd01bed2.57021", "type": "processing", "z": "11f8a924.504de7", "groupname": "Variables", "groupid": "65677cc0.24a154", "expressions": [], "statistics": [], "logmode": "no", "x": 360, "y": 500, "wires": [ [ "360842b5.63fe2e", "b3b22203.31916" ], [] ] }, { "id": "360842b5.63fe2e", "type": "ui_chartst", "z": "11f8a924.504de7", "group": "cec9f8f4.53e318", "name": "", "order": 5, "width": 12, "height": 9, "chartType": "line", "curveType": "linear", "duration": "10", "ymin": "", "ymax": "", "x": 530, "y": 500, "wires": [] }, { "id": "b3b22203.31916", "type": "subflow:8381c865.236028", "z": "11f8a924.504de7", "name": "SQRT", "env": [ { "name": "varfilter", "value": "i", "type": "str" } ], "x": 250, "y": 580, "wires": [ [ "328e10fc.806" ] ] }, { "id": "328e10fc.806", "type": "function", "z": "11f8a924.504de7", "name": "", "func": "if (msg.payload < 50) \n return { payload: true };\nelse \n return { payload: false };", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 380, "y": 580, "wires": [ [ "9782775d.8e7f88" ] ] }, { "id": "9782775d.8e7f88", "type": "ui_led", "z": "11f8a924.504de7", "order": 4, "group": "cec9f8f4.53e318", "width": 1, "height": 1, "label": "", "labelPlacement": "left", "labelAlignment": "left", "colorForValue": [ { "color": "#ff0000", "value": "false", "valueType": "bool" }, { "color": "#008000", "value": "true", "valueType": "bool" } ], "allowColorForValueInMessage": false, "shape": "circle", "showGlow": true, "name": "", "x": 530, "y": 580, "wires": [] }, { "id": "5efa66e3.e1b8a8", "type": "template", "z": "11f8a924.504de7", "name": "write", "field": "payload", "fieldType": "msg", "format": "json", "syntax": "mustache", "template": "{\n \"variablelist\": [\n {\n \"address\": \"0x20000000\",\n \"name\": \"PWM\",\n \"type\": 6,\n \"value\": \"{{payload}}\"\n }\n ],\n \"accesspoint\": 0\n}", "output": "json", "x": 330, "y": 140, "wires": [ [ "484f44e9.d2bf8c" ] ] }, { "id": "484f44e9.d2bf8c", "type": "change", "z": "11f8a924.504de7", "name": "set", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "write", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 470, "y": 140, "wires": [ [ "74708d58.546c24" ] ] }, { "id": "49eb750b.c5031c", "type": "ui_slider", "z": "11f8a924.504de7", "name": "", "label": "slider set", "tooltip": "", "group": "cec9f8f4.53e318", "order": 6, "width": 0, "height": 0, "passthru": true, "outs": "all", "topic": "", "min": "1", "max": "100", "step": 1, "x": 180, "y": 140, "wires": [ [ "5efa66e3.e1b8a8" ] ] }, { "id": "70cb8e2d.974a1", "type": "function", "z": "11f8a924.504de7", "name": "", "func": "let message_send = {\n \"variablelist\": [\n {\n \"address\": \"\",\n \"name\": \"\",\n \"type\": 0,\n \"value\": \"\"\n }\n ],\n \"accesspoint\": 0\n};\n\nif (msg.topic == \"start\" || msg.topic == \"stop\" || msg.topic == \"read\") \n{\n context.set(\"save_payload\", msg.payload);\n}\n\nelse \n{\n var save_payload = context.get(\"save_payload\");\n \n if (!save_payload){\n node.error(\"Not data for wariable !!!\");\n return;\n }\n\n for (var i = 0; i < save_payload.variablelist.length; i++){\n if (save_payload.variablelist[i].name == msg.payload.name) {\n message_send.variablelist[0].address = save_payload.variablelist[i].address;\n message_send.variablelist[0].name = msg.payload.name;\n message_send.variablelist[0].type = save_payload.variablelist[i].type;\n message_send.variablelist[0].value = msg.payload.value;\n message_send.accesspoint = save_payload.accesspoint;\n return { payload: message_send, topic: \"write\" };\n }\n }\n\n node.error(\"Wariable \\\"\" + msg.payload.name + \"\\\" not found !!!\");\n}\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 480, "y": 240, "wires": [ [ "74708d58.546c24" ] ] }, { "id": "4140295f.60a5b8", "type": "template", "z": "11f8a924.504de7", "name": "write", "field": "payload", "fieldType": "msg", "format": "json", "syntax": "mustache", "template": "{\n \"name\": \"delay\",\n \"value\": \"{{payload}}\"\n}", "output": "json", "x": 330, "y": 200, "wires": [ [ "70cb8e2d.974a1" ] ] }, { "id": "efabef3b.72916", "type": "ui_write", "z": "11f8a924.504de7", "group": "cec9f8f4.53e318", "name": "", "order": 9, "width": 12, "height": 4, "x": 490, "y": 280, "wires": [ [ "fa09c8b8.65ba18", "74708d58.546c24" ] ] }, { "id": "fa09c8b8.65ba18", "type": "debug", "z": "11f8a924.504de7", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 710, "y": 220, "wires": [] }, { "id": "a15730a7.dc0f9", "type": "ui_slider", "z": "11f8a924.504de7", "name": "", "label": "slider subflow", "tooltip": "", "group": "cec9f8f4.53e318", "order": 8, "width": 0, "height": 0, "passthru": true, "outs": "all", "topic": "", "min": "1", "max": "100", "step": 1, "x": 320, "y": 380, "wires": [ [ "c04b06c8.000128" ] ] }, { "id": "627e8e20.d4826", "type": "function", "z": "c5c3bd81.8f95f", "name": "", "func": "let message_send = {\n \"variablelist\": [\n {\n \"address\": \"\",\n \"name\": \"\",\n \"type\": 0,\n \"value\": \"\"\n }\n ],\n \"accesspoint\": 0\n};\n\nif (msg.topic == \"start\" || msg.topic == \"stop\" || msg.topic == \"read\") \n{\n context.set(\"save_payload\", msg.payload);\n}\n\nelse \n{\n var save_payload = context.get(\"save_payload\");\n \n if (!save_payload){\n node.error(\"Not data for wariable !!!\");\n return;\n }\n\n for (var i = 0; i < save_payload.variablelist.length; i++){\n if (save_payload.variablelist[i].name == env.get(\"variable\")) {\n message_send.variablelist[0].address = save_payload.variablelist[i].address;\n message_send.variablelist[0].name = env.get(\"variable\");\n message_send.variablelist[0].type = save_payload.variablelist[i].type;\n message_send.variablelist[0].value = String(msg.payload);\n message_send.accesspoint = save_payload.accesspoint;\n return { payload: message_send, topic: \"write\" };\n }\n }\n\n node.error(\"Wariable \\\"\" + env.get(\"variable\") + \"\\\" not found !!!\");\n}\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 420, "y": 160, "wires": [ [] ] }, { "id": "c04b06c8.000128", "type": "subflow:c5c3bd81.8f95f", "z": "11f8a924.504de7", "name": "", "env": [ { "name": "variable", "value": "i", "type": "str" } ], "x": 510, "y": 340, "wires": [ [ "74708d58.546c24" ] ] }, { "id": "cd14d6f1.7dc638", "type": "ui_slider", "z": "11f8a924.504de7", "name": "", "label": "slider funktion", "tooltip": "", "group": "cec9f8f4.53e318", "order": 7, "width": 0, "height": 0, "passthru": true, "outs": "all", "topic": "", "min": "1", "max": "100", "step": 1, "x": 180, "y": 200, "wires": [ [ "4140295f.60a5b8" ] ] } ]