远程实验平台开发记录(2018-2020)
1. Python flask开发网站
web开发入门:
https://blog.csdn.net/weixin_40929147/article/details/83507400
Flask搭建网站:
建议跟着flask开发手册一步步做 链接:https://dormousehole.readthedocs.io/en/latest/quickstart.html#quickstart
代码在资料夹(刘田白鸽-科研资料整理.rar\毕业设计Web开发以及程序源码\devopsdemo-master)
2. 在线图像重建
热力图成像资料:
nodejs child_process(子进程) 接收print输出的值
http://nodejs.cn/api/child_process.html#child_process_child_process_exec_command_options_callback
热力图的画法:
https://juejin.im/post/5bdc2323518825170e4a8cf8
https://juejin.im/post/5c37ed836fb9a049d81c0f82
https://juejin.im/post/5a41f3a451882560b76c6d05
3. 远程控制仪器
原理:锁相放大器和通道切换电路由MATLAB控制,MATLAB有内置的服务器web APP server,将MATLAB控制仪器的代码放在服务器,以浏览器形式打开,嵌入远程实验平台网站.
MATLAB控制实验仪器代码:
function sample = example_poll(device_id, varargin)
%% 初始化锁相放大器
clear ziDAQ;
if ~exist('device_id', 'var')
error(['No value for device_id specified. The first argument to the ' ...
'example should be the device ID on which to run the example, ' ...
'e.g. ''dev2006'' or ''uhf-dev2006''.'])
end
% Check the ziDAQ MEX (DLL) and Utility functions can be found in Matlab's path.
if ~(exist('ziDAQ') == 3) && ~(exist('ziCreateAPISession', 'file') == 2)
fprintf('Failed to either find the ziDAQ mex file or ziDevices() utility.\n')
fprintf('Please configure your path using the ziDAQ function ziAddPath().\n')
fprintf('This can be found in the API subfolder of your LabOne installation.\n');
fprintf('On Windows this is typically:\n');
fprintf('C:\\Program Files\\Zurich Instruments\\LabOne\\API\\MATLAB2012\\\n');
return
end
% The