- 博客(105)
- 资源 (8)
- 收藏
- 关注
原创 MongoDB在自动化设备上的应用示例
最最重要的是,当数据结构改变了,增加或者减少存储的数据时完全不需要改数据库表,这个在关系型数据库中就不行了。对每个数据结构写一个write document的方法,最后只需要调用wafer的write_to_database方法就能把wafer的每个die的详细信息记录到表中,包括每个die中的缺陷详细信息。写到数据库中的数据结构是这样的,结构一目了然,wafer中带着die的信息和自身的一些详细信息,die中又有defect的详细信息。发现MongoDB特别适合自动化检测数据的存储。
2024-12-07 16:22:40
451
原创 C#远程调试
5、在进程列表种选中要调试的程序,这步之前要确保在远程计算机上已打开需要调试的程序,如果没有,先到远程计算机上打开程序,再刷新下进程。3、确定双方能ping通,在本机上打开VS,打开调试->附加到进程。6、选中要调试的程序进程,点击附加。1、远程计算机打开远程调试工具。2、设置远程调试工具参数。
2024-07-25 09:52:20
285
原创 ODB++资料解析
实际上就是ODB+文件是一个JOB类,包含有step等等信息,一般整个板就是一个panel,panel是由set组合成的,set又是有一个pcs组合来的,pcs就是对应我们的PCB单板了。奥宝公司和康代公司的设备都是用的ODB++格式进行PCB的生产和检测。odbGeometry 存放ODB++的图元,主要用到的pad(焊盘)segment(线)surface (铜皮)arc(弧线)对ODB++文件进行解析把数据栅格化很重要,查了网上找不到一个成熟能用的ODB++文件解析代码。
2023-08-16 21:23:11
6215
6
原创 人理解循环,神理解递归---1
所有的递归都是穷举递归本身就是把所有符合题意的情况穷举出来,任何用递归实现的算法都可以用循环穷举出来。为什么?递归总要有一个结束的条件,而这个结束的条件一定在算法本身是被收敛回来的结束条件的函数值也必须是已知的用递归算组合问题从n个数里面选k个数,有多少种选法首先需要清楚,从n个数中选k个数等于从n-1个数中选k-1个数加上从n-1个数中选k个数比如从1,2,3,4,5中选3个数等于第一个选1与第一个不选1两种情况的总和而第一个选1之后剩下4个数再选两个第一个
2020-09-11 17:38:44
617
原创 (4)C# HashTable,Dictionary<T>
class Program { class student { public student(string _name, int _id) { name = _name; id = _id; } public string name; public int id; ...
2020-09-04 23:18:05
241
1
原创 (3)C# List<T>,LinkedList<T>
using System;using System.Collections.Generic; //List所在名称空间using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections; //ArrayList 所在名称空间namespace CSharpTest{ class Program { class student { .
2020-09-04 21:43:30
503
原创 (2)C# ArrayList,List<T>
using System;using System.Collections.Generic; //List所在名称空间using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections; //ArrayList 所在名称空间namespace CSharpTest{ class Program { class student { .
2020-09-03 23:09:48
216
原创 (1) C# 数组
class Program { class student { public student(string _name, int _id) { name = _name; id = _id; } public string name; public int id; ...
2020-09-03 22:19:11
182
原创 视觉运控平台软件框架(8)---运动控制窗体
有两个运动控制窗体,一个负责运动控制部分,一个负责Io控制,运动控制下面部分是预留用来做插补功能测试的。IO可以自由配置,外部怎么接线就怎么配置。配置完成后存成ini文件。...
2020-08-23 21:27:39
2117
5
原创 视觉运控平台软件框架(6)---脚本编辑器Qsci
qscintilla是Qt开源的文本编辑器,可用之来做一个代码编辑器,它支持包括C,C++,Python,Java等多种编程语言的语法,当然也是支持我们用到的lua的。它完整支持源代码的编辑和调试,包括语法高亮、错误指示、代码完成(code completion)和调用提示(call tips)。能包含标记(marker)的页边(margin)可用于标记断点、折叠和高亮当前行。网上说这个编辑器包括有错误提示功能,但我还未能找到相关实现方式。在这个界面编辑lua脚本,点击执行即可执行相应的脚本。
2020-08-22 22:38:01
1151
原创 视觉运控平台软件框架(5)---脚本lua,luaWrapper
lua源码,源码的编译方式我之前的博客有,这里不提。luaWrapperModule:对自己写的类封装成lua供lua脚本调用。有两种封装方式,可以封装成静态函数或者封装成lua类,但是我自己测试了下,如果封装成lua类的话内存不能自动释放,运行一段时间后内存用完就崩溃了。封装成静态函数调用就不需要关心内存的问题,因为它没有创建新的对象。下面代码是对运动控制部分的封装,有封装成类的也有封装成静态函数的。封装静态函数封装成类供lua脚本调用后续添加图像算法的封装...
2020-08-22 21:47:39
1274
原创 视觉运控平台软件框架(3)---通信Communication,ComunicationDialog
目前集成了串口通信与网口通信两个通信方式,串口与网口都是基于qt写的,两种通信方式以动态库导出,用lua脚本封装成相应的serialport类和tcp类,都可以通过lua脚本调用。CommunicationDialog:通信窗体类,用于对通信模式的配置与测试界面有点难看,先将就着,可以用qss美化。...
2020-08-22 17:06:42
900
1
原创 视觉运控平台软件框架(1)---总览
近期有点空余时间,花点时间写了个视觉运控平台框架,该框架集成了运动与视觉部分。视觉和运控部分均可独立配置,并且运控部分的在配置完轴控和视觉部分的图像处理流程后,通过Lua脚本语言控制机器的整个动作流程。这跟目前市场上的大多数视觉软件相比也算是一点点小小的创新。并且考虑后续把所有图像算法都通过lua脚本导出,这样就跟Halcon软件一样的开发方式,还比它多了个运动控制的部分。这样做的好处就是图像处理和运动控制统一了,不需要像现在很多视觉软件的控制方式那样图像处理完后还要设置一个通信与外部负责运控控制的模快去通
2020-08-22 15:19:24
4372
12
原创 (15)C++---回调函数
1、什么情况下会用到回调函数?现在一般遇到的需要用到回调函数的都是涉及应用数据采集的某类设备,设备的SDK是用C语言写好封装好的。当设备采集完数据后需要通知读取数据的一方去对这些数据进行某种处理。比如相机图像的采集,激光雷达数据的采集。例如下面禾赛科技的激光雷达SDK中用回调函数对数据进行处理#include "hesaiLidarSDK.h"//SDK中的函数为:boost::function<void(boost::shared_ptr<cv::Mat> mat
2020-07-28 00:05:38
418
原创 (14)C++算法---自定义的线程池
需要并行处理多个细小的任务时,不需频繁创建销毁线程ThreadPool.h#pragma once#include <vector>#include <utility>#include <queue>#include <thread>#include <functional>#include <mutex>#include <condition_variable>class ThreadPool
2020-07-26 13:49:55
398
原创 (13)C++容器---优先队列priority_queue
#include <iostream>#include <thread>#include <algorithm>#include <functional>#include <numeric>#include <vector>#include <chrono>#include <thread>#include <queue>//#include "ThreadPool.h"usin.
2020-07-26 12:21:12
231
原创 VS2019远程调试
1、网线,连接调试电脑与待调试的工控机2、下载vs2019远程调试工具(https://visualstudio.microsoft.com/zh-hans/downloads/?rr=https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=vs-2019),安装到工控机上。3、启动vs2019远程调试工具,安装完成后在工控机上开始->所有程序->Visual Studio 2019-&
2020-07-10 11:31:49
9606
1
原创 (12)C++算法---查找,排序,std::sort,std::find,std:search,std::binary_search
#include <iostream>#include <thread>#include <algorithm>#include <functional>#include <numeric>#include <vector>using namespace std;struct Point //对类也是一样的{ Point(int _x,int _y) { x = _x; y = _y; } int ..
2020-06-21 22:34:24
704
原创 (11)C++算法---transform,std::for_each
遍历容器执行某一算法的快捷用法#include <iostream>#include <thread>#include <algorithm>#include <functional>#include <numeric>#include <vector>using namespace std;int myPlus(int a,int b){ return a + b ;}void print(int a.
2020-06-21 15:33:03
331
原创 (10)C++智能指针---shared_ptr,dynamic_pointer_cast
#include <iostream>#include <thread>#include <memory> //智能指针所在头文件using namespace std;class BaseClass{public: BaseClass(){} ~BaseClass(){} virtual void print() { cout << "this is base class" << endl; }protected:.
2020-06-21 12:18:06
2076
原创 (1)Opencv Mat图像像素的访问与遍历
在开始之前先下载一个可以查看Mat图像数据的插件1、打开vs,找到菜单栏->工具->扩展与更新->联机->搜索Image2、下载完成之后关闭VS,提示安装信息后安装即可。3、打开ImageWatch。程序运行过程中可在调试模式下查看图像信息。#include <iostream>#include <thread>#include "Matx.h"#include <opencv2\core.hpp>#incl.
2020-06-13 11:47:12
427
原创 Halcon例程分析20:Halcon多线程处理图像
二维码* This is a simple example program that demonstrates the* Aoption to call several HLtoCON operars or procedures in parallel.* In general, owing to the overheadof thread creation,* not in all cases a speedup can be expected,* especially, if the u
2020-06-12 20:13:33
3882
原创 Halcon例程分析19:点胶质量-断胶、少胶、胶宽、胶路检测
打开halcon,按下ctrl+e打开halcon自带例程。应用范围->二维测量比较->apply_bead_inspection_model.hdev* This example shows how to use bead inspection to verify* adhesive beads. Bead inspection can be used to detect the* following errors:* - segments where adhesive is m
2020-06-11 22:54:40
11955
3
原创 (9)C++函数模板---template,typename
#include <iostream>#include <thread>#include "Matx.h"template <typename _Tp>void Swap(_Tp& a, _Tp& b){ _Tp tmp = a; a = b; b = tmp;}int main(){ int a = 5; int b = 4; std::cout << a << b << std.
2020-06-02 13:05:48
265
原创 (8)C++互斥量,条件变量---mutex,condition_variable
互斥量std::metux:锁定资源不被同时访问条件变量:(1)阻塞线程,等待某条件满足继续往下执行(2)通知其他线程继续执行,因为条件变量在阻塞过程中并不会轮询当前条件的值#include <iostream>#include <thread>#include <windows.h>#include <string>#include <mutex>#include <condition_variable>#inc
2020-05-30 21:42:10
353
原创 (7)C++函数绑定---function,bind
// CppTest.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include <iostream>#include <thread>#include <windows.h>#include <string>#include <mutex>#include <functional>#include <chrono>int number = 0;std::mutex.
2020-05-30 09:55:45
845
原创 (6)C++线程---thread
#include <iostream>#include <thread>#include <windows.h>#include <string>#include <mutex>int number = 0;std::mutex mtx;void fun1(){ for (int i = 0; i < 1000; i++) { std::unique_lock<std::mutex> lck(mtx.
2020-05-30 08:56:39
166
原创 (5)C++容器---map
map---一对一hash#include <iostream>#include <thread>#include <windows.h>#include <string>#include <map>void printMap(std::map<int,std::string> &m){ std::map<int,std::string>::iterator itor; if (m.begin
2020-05-24 22:01:08
141
原创 (4)C++容器---容器的几种遍历方式
#include <iostream>#include <thread>#include <windows.h>#include <queue>#include <string>#include <list>#include <vector>void printVector(std::vector<int> &vec){ std::vector<int>::iterator.
2020-05-23 10:55:49
338
原创 (3)C++容器---list
list---链表,不连续的内存存储数据,随即存取效率低,不支持[]直接访问操作#include <iostream>#include <thread>#include <windows.h>#include <queue>#include <string>#include <list>void printList(std::list<int> &list){ std::list<int
2020-05-23 00:32:46
152
原创 (2)C++容器---deque
deque---双端队列,可从两头对元素进行操作#include <iostream>#include <thread>#include <windows.h>#include <queue>#include <string>int main(){ std::deque<int> q = {1,2,3,4,5,6,7,8,9};//deque是可以直接赋值的 int data = 0; data = q.at(2
2020-05-21 21:56:04
394
原创 (1)C++容器---queue
queue---先进先出队列int main(){ std::queue<int> q;//区别于deque,deque是可以直接赋值的 q.push(1);// q.push(2); q.push(3); //遍历队列 while(!q.empty()) { std::cout << q.front() << std::endl; q.pop();//把队列头的元素剔除 } q.push(1);// q.push(2); q.
2020-05-21 20:46:16
167
原创 非标框架(11)-有限状态机4-进板状态
/// <summary> /// 进板中 /// </summary> public class PalletInState : StateBase { private static PalletInState instance = new PalletInState(); public static PalletInState Instance => instance; public o...
2020-05-10 01:43:19
312
原创 非标框架(10)-有限状态机3-空闲状态
using LaserWelder.Agency;using LaserWelder.Machine;namespace LaserWelder.StateMachine{ /// <summary> /// 空闲状态 /// </summary> public class IdleState : StateBase { private static IdleState instance = new IdleState.
2020-05-09 21:38:02
307
原创 非标框架(9)-有限状态机2-状态机主体类
using System;using LaserWelder.Machine;using LaserWelder.Util;namespace LaserWelder.StateMachine{ public class FSM : TaskLoop { private static FSM instance = new FSM(); public static FSM Instance => instance; /// &.
2020-05-09 21:09:17
255
原创 非标框架(8)-有限状态机1-状态机基类
using System;namespace LaserWelder.StateMachine{ public abstract class StateBase : ICanExcuteMsg,ICloneable { public abstract void Update(); public abstract StateType Type { get; } public abstract void Enter(StateType old...
2020-05-09 21:07:33
302
PluginTest.rar
2019-11-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人