GithubHelp home page GithubHelp logo

tyill / svisual Goto Github PK

View Code? Open in Web Editor NEW
23.0 6.0 9.0 155.12 MB

Monitoring and record(save) of data for Arduino and STM32

License: MIT License

CMake 1.11% C 13.05% C++ 75.51% Shell 0.15% HTML 0.03% CSS 0.08% JavaScript 10.01% Dockerfile 0.05%
arduino trends monitoring visualization graph chart serial realtime recording

svisual's Introduction


Docker License
Build Status License: MIT

The SVisual software is designed to monitor the operation of the MK devices, debug the program, alert the user to the events that have occurred.

Features

  • connection to the MK via COM port (usb for arduino), over Ethernet or Wi-Fi protocol TCP;

  • Interrogation of values of signals in real time with frequency before 100 Hz (default 10 Hz), the number of devices and signals is selected by the user;

  • the permissible number of signals for recording 2048;

  • output of the values of the selected signals to the monitor screen in real time;

  • record the archive of signals to the PC hard disk;

  • viewing the archive using additional SVViewer software;

  • ability to set alerts for an event (triggers) that have occurred, start a custom process when the trigger is triggered;

  • adding a signal for viewing / recording only by the client, no additional movements are required

  • export data to xlsx, json or txt

  • client UART+DMA for stm32f1 https://github.com/burrbull/svisual-stm32f1

  • docker image https://hub.docker.com/r/tyiler/svdocker

  • viewing in a web browser

  • Zabbix agent supported

  • Save into ClickHouseDb supported

Demo

https://www.youtube.com/watch?v=LR0Rb964DLA&feature=youtu.be

https://www.youtube.com/watch?v=wlvArf7h6lE

Arduino example

#include <SVClient.h>
void setup() {

  bool ok = svisual::connectOfCOM("test");

}
int cnt = 0;
void loop() {

  svisual::addIntValue("dfv", cnt);

  ++cnt;
  if (cnt > 10) cnt = 0;

  bool odd_cnt = cnt % 2;

  svisual::addBoolValue("bFW", odd_cnt);

  svisual::addBoolValue("bBW", !odd_cnt);

  delay(200);
}

As a result


Use in Linux

Should be installed:

  • qt
  • sqlite: sudo apt install libsqlite3-dev
  • libuv: sudo apt install libuv1-dev
  • clickhouse-cpp

Aux dependences here:

  • lua53
  • qtXlsxWriter

Build from QtCreator:

Build with cmake:

cd src
rm -rf build  
mkdir build  
cmake -B build -S . -DCMAKE_BUILD_TYPE="Release" && cmake --build build --parallel  

License

Licensed under an [MIT-2.0]-license.

svisual's People

Contributors

burrbull avatar dependabot[bot] avatar tyill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

svisual's Issues

SVisual Client in C not C++

Hello,
i am very interesting in your application, but i try to write code for the STM32F4 controller in C without success.

Is it possible to write also an example code in C?

I am caching 64 values of thermocouples and then i want to send them over CAN and USB (to Svisual)
So i dont need the array of last 10 values in the "vals". i want to send 64 float signals (name+value) straigt to the svisual.

signals are stored for example into inputs[0 ... 63].temperature as float

please help me out how to use your protocol

typedef struct {
	float temperature;
	float current;
	float voltage;
	float flow;
	uint32_t average;
	type_t type;
} input_t;

typedef struct {
	char name[SV_NAMESZ];
	long int type; // tBool = 0, tInt = 1, tFloat = 2
	long int vals[SV_PACKETSZ]; // values data of 1 sec
} dataRef;
	
while (1) {
		measuring = TRUE; //interrupt enable
		get_inputs();
		measuring = FALSE; //interrupt disable

		print_inputs(CAN);
		print_inputs(USB);  // < this to SVisual
		HAL_Delay(1000);
	}

void print_inputs(uint8_t interface) {
   if(interface == CAN) {
   ...
   }

   if (interface == USB) {

		send_USB(start, strlen(start));

		int sz = 1; //normally CH_MAX = 64

		int vlSz = sizeof(dataRef);
		long int allSz = SV_NAMESZ + vlSz * sz;


		send_USB((char*) &allSz, 4);

		send_USB((char*)"TC2CAN", SV_NAMESZ);

		dataRef TXdata[1]; // normally TXdata[CH_MAX] = 64

		for (int i = 0; i < sz; ++i) {
			TXdata[i].type=(long int)2; //tBool = 0, tInt = 1, tFloat = 2
			memcpy(TXdata[i].name , "CH1_Temp", sizeof(SV_NAMESZ));
			memcpy(TXdata[i].vals , (long int)1234, sizeof(SV_PACKETSZ));
			send_USB(TXdata[i], sizeof(TXdata[i]));
		}

		send_USB("=end=", strlen("=end="));
	}
}

При соединении Arduino по Ethernet не появляется модуль в SVMonitor.

Здравствуйте.
При соединении Arduino по Ethernet не появляется модуль в SVMonitor. По COM всё ok и в программе и в браузере. Пример скетча из мануала, только заменил connectOfCOM("test") на connectOfEthernet("test", (0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED), (127,0,0,1), (127,0,0,1), 2145). Ардуино MEGA2560 + miniW5100, Ethernet Shield проверял - работает. ОС – Win-7. Наверное, что-то я делаю не так, или что-то не делаю.... Помогите пожалуйста разобраться.
Sketch
SVMonitor

proposal for features, potential bugs

Hello Alexander,
i am using your application now very frequently. It is very useful!

During the use of 1.1.7 i have some proposals for improvement:

  1. Add all channels by right-click on the MODULE to the plot-window (menu on right-click -> add all )

  2. Sorting function in the statistics window/table (sort by name, Y1, Y2, MIN, MAX, AVG)

  3. auto-save preferences of the Plot-Window (grid-settings, min, max, step, etc) to SVMonitor.ini / SVViewer.ini

  4. possibility to reset color presetting in channel of module
    2020-07-15 15_46_41-SVViewer 1 1 7

  5. possibility to preset the color with lua script?

setFloatValue("PFC_xx_CH08_11", nval, ctm,"#ff0000");
  1. auto-update of statistics table every second? -> also the sorting
  2. predefined lua script of channel has a bug: Offset variable will be added to the time-variable instead of value-variable. Template should be changed
ctm = getTimeValue("TC2CAN", "CH08_Temperature"); 
cval = getFloatValue("TC2CAN", "CH08_Temperature");

nval = cval;
offs = 0;

setFloatValue("PFC_xx_CH08_11", nval, ctm + offs); --> offs should be at nval
  1. add accessible global time-variable that virtual signals can be added. For example a max temperature line. i did it like
ctm = getTimeValue("TC2CAN", "CH01_Temperature"); --> variable from CH1, but maybe not always available
setFloatValue("Temp_MAX_120",120, ctm);

to

setFloatValue("Temp_MAX_120",120, time_global);
  1. I discoverd an issue with loading of script files in SVMonitor & SVViewer
    i define/build my lua script in EXCEL and loading it into the application -> it crashes
    i attached the rec file and the lua script -> please remove the .txt in the file name

svrec_20200714_1610UTC2.dat.txt
TC2CAN-Measurement-Script150720-152019.lua.txt

I hope you can help!

Thanks in advance & best regards!

Просмотр в браузере

Нужно добавить возможность просмотра (простого, без триггеров и тп) в браузере.
Тут же будет возможность просмотра с телефона.

Клиент для embedded-hal

Пытаюсь переписать ардуиновский клиент на rust для stm32.

Просьба уточнить, правильно ли я представляю структуру пакета?

svformat

Перенос сигналов bool в верхнею область окна.

Здравствуйте.
Добавьте пожалуйста, в новой версии программы, возможность переноса сигналов типа bool в верхнею область этого же окна. В некоторых случаях это улучшит визуальное восприятие графиков.
Заранее спасибо.

Proposals for improvement of SVMonitor

Hello Alexander,

I used yesterday the first time your application in "real environment/measurement session".

Therefore i have some proposals for SVMonitor.

  1. Manual scale of the Y-axis, like right-mouse-click on Y-axis (or separate Graph-Settings entry) to define the visual range. eg -40(°C) ... 150(°C)

  2. Meaningful separation of the y-axis. You see in the picture i have only two y-marker (17 and 113).
    i would expect to have it in 5-steps / 10-steps, for example 0, 5 , 10 ,15 .... or 0, 10, 20, 30, ....
    image
    image

  3. Somehow a possibility to overwrite the signal names + add offset. (nice to have feature)
    -> i did it with lua script (read value+time, add offset, change name), LUA is very important & useful feature!

I would really appreciate your support!

best regards!

SV Viewer Settings

SV Viewer doesn't save Settings of the PLOT window

min, max, step needs to set every time on start

Unable to copy table data

When the entire table of values (below the graph) or a single column is selected and copied, only a cell value is pasted (both in SVMonitor and SVViewer).
Would it be possible to enable table copy/paste?
Thanks!

Ошибки компиляции для платы Arduino Due

Здравствуйте.
Подскажите пожалуйста, как изменить sv_client.cpp при замене MsTimer2 на DueTimer.
Ошибки компиляции для платы Arduino Due:
sv_client.cpp:124:3: error: 'set' is not a member of 'DueTimer'
DueTimer::set(SV_CYCLEREC_MS, thrProc);
sv_client.cpp:125:19: error: cannot call member function 'DueTimer& DueTimer::start(long int)' without object
DueTimer::start();

Virtual Channels often stuttering

Hello Alex,
i see often the issue, that the virtual channels are stuttering. It looks like the values are not forwarded or something like that because the real channels are fine.

I use the latest version

Script was used:
`CH15_time = getTimeValue("TC2CAN","CH15_Temperature");
CH16_time = getTimeValue("TC2CAN","CH16_Temperature");
CH17_time = getTimeValue("TC2CAN","CH17_Temperature");

CH15_val = getFloatValue("TC2CAN","CH15_Temperature");
CH16_val = getFloatValue("TC2CAN","CH16_Temperature");
CH17_val = getFloatValue("TC2CAN","CH17_Temperature");

setFloatValue("W_SW_A_P4.3_CH15",CH15_val,CH15_time);
setFloatValue("W_SW_B_P4.4_CH16",CH16_val,CH16_time);
setFloatValue("W_SW_C_P5.1_CH17",CH17_val,CH17_time);`

image

Формула пересчета

Идея навеяна #9.
Думаю стоит добавить возможность ввода формулы, по которой можно будет, допустим,переводить из одних единиц измерения в другие (масштабировать значения), если это по какой-то причине невозможно на самом контроллере.

Запуск теста на Arduino

Здравствуйте! Не пойму, что я делаю не так: скетч правильный, загружается в МК, в SVMonitor прописан нужный COM-порт, но никаких модулей всё равно не появляется.
Помогите, пожалуйста!

Цвет графика как атрибут сигнала, определяемый пользователем.

Программное обеспечение, такого рода как SVisual, не редко используется для работы с однотипными устройствами, у которых контролируют одни и те же сигналы. В случаях, когда их относительно не много, у пользователя цвет графика начинает ассоциироваться с наименованием сигнала. В результате и в реальном времени и при просмотре архива, как минимум нет необходимости отвлекаться на легенду. Можно было бы сделать цвет, таким же атрибутом сигнала, определяемым пользователем, как например Group или Comment. Ну, или каким либо иным образом. IMHO, эта опция пригодиться многим.
Заранее спасибо.

SV Viewer not open new dataset

  1. if i open in SV viewer one dat file - it loads the data
  2. if i open in the same instance new dat file - it doesn't load the new data - it simply shows the old loaded data

20230303.zip

SVViewer crash

SV Viewer crashes if i open 4 dat files which belongs together (one measurement)
sometimes it is also crashing if i open only one dat file

and rightclick on Module - "show all"
or
simply try to show one channel

20230303.zip

usb com в linux

Попробовал запустить Вашу программу в Ubuntu. Сборка для CentOS запустилась с полпинка.
Возникла проблема с выбором порта.
Возникает вопрос: COMx - это /dev/ttySx ?
И если так, то как подключить usb<->uart переходник, который определяется как /dev/ttyUSB0,
а при переподключении может еще и меняться номер ?

default

default

sorting function is not right

Hello Alex,
in Version 120 i have the issue that values with 3 digits do not sort the right way along with 2 digit values. See in attachment

Thank you very much!

Best regards!

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.