扫描功能修改

This commit is contained in:
wangxx1809 2024-05-09 12:49:18 +08:00
parent d5f47137ae
commit 5983a15237
44 changed files with 7106 additions and 133 deletions

View File

@ -131,7 +131,8 @@ void DataHandle::DataCallBackHandle(const ReadData& msg) {
case ELECFGPARAM:
ConfigManager::Instance()->m_EleCfg.Update(msg); break;
case LOADPARAM:
ConfigManager::Instance()->GetMachine()->Update(msg); break;
ConfigManager::Instance()->GetMachine()->Update(msg); break;
default:break;
}

View File

@ -32,7 +32,7 @@ public:
}
}
void SetPushMsg(WRITETYPE dataType,const string& nameKey,const string& strValue,DATATYPE valueType) {
void SetPushMsg(WRITETYPE dataType,const string& nameKey,const string& strValue = "", DATATYPE valueType= UNKNOW) {
if (m_streamClient) {
WriteData msg ;
msg.dataType = dataType;

View File

@ -78,6 +78,8 @@ enum READTYPE {
LOADPARAMRSP, //装载参数
SCANCTRLSTATE, //scanctrl参数
};
enum DATATYPE {
@ -159,8 +161,14 @@ enum WRITETYPE {
SETZEROPOS, //AxisState使用
AXISSTOPALL, //axis 运动急停
/********************配置信息******************/
PARAMLIMITCFG,
EXTCFG,
LOADPARAM, //装载参数
EXTCFG, //ext配置参数
/********************振镜控制******************/
SCANCTRLFUNC, //振镜控制函数
};

View File

@ -14464,14 +14464,14 @@ bool HBD1000::CheckPrintMoldReady()
bool HBD1000::CheckPrintHigh(float jobhigh)
{
/* float ah = m_MachineCtrl->GetAllowPrintHigh();
float ah = m_SysParamWrapper->m_AllowPrintHigh->GetValue();
if (jobhigh > ah)
{
char buffer[512];
char buffer[512] = {0};
sprintf_s(buffer, sizeof(buffer), _(u8"需要打印的高度:%.3f 超过了允许的打印高度:%.3f").c_str(), jobhigh, ah);
ToastBean* bean = new ToastBean(string(buffer), 5000, Toast::COLOR_RED);
g_Toast->AddToast(bean);
return false;
}
else*/ return true;
else return true;
}

View File

@ -7153,14 +7153,14 @@ string HBD1500::GetMoldCanotDownInfo()
bool HBD1500::CheckPrintHigh(float jobhigh)
{
/* float ah = m_MachineCtrl->GetAllowPrintHigh();
float ah = m_SysParamWrapper->m_AllowPrintHigh->GetValue();
if (jobhigh > ah)
{
char buffer[512];
char buffer[512] = {0};
sprintf_s(buffer, sizeof(buffer), _(u8"需要打印的高度:%.3f 超过了 允许的打印高度:%.3f").c_str(), jobhigh, ah);
ToastBean* bean = new ToastBean(string(buffer), 5000, Toast::COLOR_RED);
g_Toast->AddToast(bean);
return false;
}
else*/ return true;
else return true;
}

View File

@ -239,6 +239,7 @@
<ClCompile Include="Render\BPData.cpp" />
<ClCompile Include="Render\Part.cpp" />
<ClCompile Include="Render\Renderer.cpp" />
<ClCompile Include="ScannerCtrl\BaseCtrl.cpp" />
<ClCompile Include="SystemInfo.cpp" />
<ClCompile Include="Toast.cpp" />
<ClCompile Include="UI\Controller.cpp" />
@ -374,6 +375,7 @@
<ClInclude Include="Render\BPData.h" />
<ClInclude Include="Render\Part.h" />
<ClInclude Include="Render\Renderer.h" />
<ClInclude Include="ScannerCtrl\BaseCtrl.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="SystemInfo.h" />
<ClInclude Include="Toast.h" />

View File

@ -82,6 +82,9 @@
<Filter Include="Purifier">
<UniqueIdentifier>{94712822-da22-4bd1-a56c-ee9e0094691b}</UniqueIdentifier>
</Filter>
<Filter Include="ScannerCtrl">
<UniqueIdentifier>{069af0dc-932a-42b2-89b1-f36d33c06da9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="protobuf\stream.grpc.pb.cc">
@ -414,6 +417,9 @@
<ClCompile Include="config\bean\ParamLimitCfg.cpp">
<Filter>config\bean</Filter>
</ClCompile>
<ClCompile Include="ScannerCtrl\BaseCtrl.cpp">
<Filter>ScannerCtrl</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="protobuf\stream.grpc.pb.h">
@ -822,6 +828,9 @@
<ClInclude Include="config\bean\ParamLimitCfg.h">
<Filter>config\bean</Filter>
</ClInclude>
<ClInclude Include="ScannerCtrl\BaseCtrl.h">
<Filter>ScannerCtrl</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="protobuf\stream.proto">

View File

@ -0,0 +1,104 @@
#pragma once
#include "../LanguageManager.h"
class IntelliScanState {
public:
IntelliScanState() {
m_GalvanometerScannerTemp = 0.0f;
m_ServoBoardTemp = 0.0f;
m_PDSupplyVoltage = 0.0f;
m_DSPCoreSupplyVoltage = 0.0f;
m_DSPIOVoltage = 0.0f;
m_AnalogSectionVoltage = 0.0f;
m_ADConverterSupplyVoltage = 0.0f;
m_PDSupplyCurrent = 0.0f;
}
~IntelliScanState() {}
static string GetStopEventInfo(int ivalue, bool& bvalue)
{
string info = _(u8"没有").c_str();
bvalue = false;
switch (ivalue) {
case 0x10: {
info = _(u8"摆镜到达危险边缘位置").c_str();
bvalue = true;
}break;
case 0x20: {
info = _(u8"AD转换错误").c_str();
bvalue = true;
}break;
case 0x30: {
info = _(u8"扫描系统温度越限").c_str();
bvalue = true;
}break;
case 0x40: {
info = _(u8"外部电压过低").c_str();
bvalue = true;
}break;
case 0x50: {
info = _(u8"标志不合法").c_str();
bvalue = true;
}break;
case 0xD0: {
info = _(u8"看门狗超时").c_str();
bvalue = true;
}break;
case 0xE0: {
info = _(u8"振镜位置到达超时").c_str();
bvalue = true;
}break;
}
return info;
}
public:
//bool m_IsInternalVoltagesNormal; //内部电压正常
bool m_GalvanometerScannerTempOK; //振镜预热完成
float m_ActualPosition; //真实位置
float m_SetPosition; //设值位置
float m_PositionError; //位置误差
//float m_ActualCurrent; //真实电流
//float m_ActualVelocity; //真实速度
float m_GalvanometerScannerTemp; //振镜温度
float m_ServoBoardTemp; //伺服板卡温度
float m_PDSupplyVoltage; //PD供电电压
float m_DSPCoreSupplyVoltage; //DSP核心供电电压
float m_DSPIOVoltage; //DSP输入输出电压
float m_AnalogSectionVoltage; //模拟区电压
float m_ADConverterSupplyVoltage; //AD转换供电电压
float m_PDSupplyCurrent; //PD供电电流
bool m_IsGalvanometerScannerOutputStageOn; //振镜输出级生效
bool m_IsGalvanometerScannerHeaterOutputStageOn; //振镜加热器输出级生效
bool m_IsInternalVoltagesNormal; //内部电压正常
bool m_IsPositionErrorNormalRange; //位置误差正常
bool m_IsScannerAndServoBoradTempNormal; //振镜和伺服温度正常
bool m_IsBootingProcessCompleted; //启动处理完成
bool m_IsCriticalError; //发生严重错误
bool m_IsExternalPowderLow; //外部电压欠压
bool m_IsScanSystemTempOverLimit; //扫描系统超温
bool m_IsADConverterSuccessfullyInit; //AD转换初始化成功
bool m_IsScannerReachedCriticalEdgePos; //振镜到达临界边缘位置
bool m_IsAllControlParametersValid; //允许控制参数
bool m_IsADConverterVoltageOK; //AD转换供电正常
bool m_IsAnalogSetionVoltageOK; //模拟区电压正常
bool m_IsDSPIOVoltageOK; //DSP 输入输出电压正常
bool m_IsDSPCoreVoltageOK; //DSP核心供电正常
bool m_IsAGCVoltageOK; //AGC电压正常
bool m_IsServoBoradOperationTempNormal; //伺服板卡操作温度正常
bool m_IsGalvanometerScannerOperationTempNormal; //振镜操作温度正常
int m_LowState;
int m_HighState;
int m_StopEven;
};
class ScanStateXY {
public:
ScanStateXY() {}
~ScanStateXY() {}
public:
bool m_IsConnected;
UINT m_LastError;
IntelliScanState m_X;
IntelliScanState m_Y;
IntelliScanState m_Focus;
};

View File

@ -0,0 +1,402 @@
#include "RTC4Scanner.h"
#include "RTC4impl.h"
#include "../global.h"
#include "../Logger.h"
#include "../LanguageManager.h"
#include "../utils/MathHelper.h"
RTC4Scanner::RTC4Scanner(LaserCfg* cfg) :Scanner(cfg)
{
}
RTC4Scanner::~RTC4Scanner()
{
}
bool RTC4Scanner::Init()
{
#ifdef _DEBUG
return true;
#endif
m_output_vfactor = 1023.0 / 10.0;
m_list_memory = 4000;
m_kfactor = m_CorrectParamCfg->m_FactorK;
m_xfactor = m_kfactor*m_CorrectParamCfg->m_xcorrect;
m_yfactor = m_kfactor*m_CorrectParamCfg->m_ycorrect;
short errorCode = 0;
char buffer[512];
sprintf_s(buffer, sizeof(buffer), "%sSLM%d.ctb", g_AppPath.c_str(), m_LaserCfg->m_Cno);
string crtPath = string(buffer);
errorCode = n_load_correction_file((unsigned short)m_LaserCfg->m_Cno, crtPath.c_str(), 1, 1.0, 1.0, m_CorrectParamCfg->m_angle, 0.0, 0.0);
if (errorCode) {
g_log->TraceError(g_LngManager->Log_LoadCorrectFileError->ShowText());
m_InitErrorInfos.push_back(g_LngManager->Log_LoadCorrectFileError->ShowText());
return false;
}
string pfilePath = g_AppPath + "SLM.hex";
errorCode = n_load_program_file((unsigned short)m_LaserCfg->m_Cno, pfilePath.c_str());
if (errorCode) {
g_log->TraceError(g_LngManager->Log_LoadRTCFileError->ShowText());
m_InitErrorInfos.push_back(g_LngManager->Log_LoadRTCFileError->ShowText());
return false;
}
n_select_cor_table((unsigned short)m_LaserCfg->m_Cno, 1, 0);
n_set_laser_mode((unsigned short)m_LaserCfg->m_Cno, 4);
unsigned short power = 1023.0* m_PowerCompensateCfg->CalcPowerCompensate((float)m_ScanTestCfg->m_laser_power) / 100.0;
unsigned short jumpDelay = m_ScanParamCfg->m_jump_delay / 10;
unsigned short markDelay = m_ScanParamCfg->m_scan_delay / 10;
unsigned short polygonDelay = m_ScanParamCfg->m_polygon_delay / 10;
double markspeed = m_kfactor* m_ScanParamCfg->m_mark_speed / 1000.0;
double jumpspeed = m_kfactor* m_ScanParamCfg->m_jump_speed / 1000.0;
unsigned short edgeLevel = m_ScanParamCfg->m_edge_level / 10;
unsigned short minJumpDelay = m_ScanParamCfg->m_min_jump_delay / 10;
float xoffset = m_CorrectParamCfg->m_xposfix*cos(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0) - m_CorrectParamCfg->m_yoffset*sin(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0);
float yoffset = m_CorrectParamCfg->m_xposfix*sin(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0) + m_CorrectParamCfg->m_yoffset*cos(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0);
n_set_start_list((unsigned short)m_LaserCfg->m_Cno, 1);
n_set_scanner_delays((unsigned short)m_LaserCfg->m_Cno, jumpDelay, markDelay, polygonDelay);
n_set_laser_delays((unsigned short)m_LaserCfg->m_Cno, (short)m_ScanParamCfg->m_laseron_delay, (short)m_ScanParamCfg->m_laseroff_delay);
n_set_delay_mode((unsigned short)m_LaserCfg->m_Cno, 1, 0, edgeLevel, minJumpDelay, (unsigned int)(m_ScanParamCfg->m_jump_length_limit*m_kfactor));
n_set_jump_speed((unsigned short)m_LaserCfg->m_Cno, jumpspeed);
n_set_mark_speed((unsigned short)m_LaserCfg->m_Cno, markspeed);
n_write_da_1_list((unsigned short)m_LaserCfg->m_Cno, power);
n_set_offset_list((unsigned short)m_LaserCfg->m_Cno, (short)(xoffset*m_xfactor), (short)(yoffset*m_yfactor));
n_set_end_of_list((unsigned short)m_LaserCfg->m_Cno);
ListExecute(1, true);
return true;
}
bool RTC4Scanner::PreInit(unsigned int &card_count)
{
card_count = rtc4_count_cards();
g_ScanSerial = get_serial_number();
return true;
}
int RTC4Scanner::GetSerialNo(unsigned int no)
{
return n_get_serial_number(no);
}
bool RTC4Scanner::StopWork()
{
n_stop_execution((unsigned short)m_LaserCfg->m_Cno);
return true;
}
void RTC4Scanner::LoadList(unsigned int listid, bool wait)
{
if (wait) {
bool isbreak = false;
unsigned short busy, position;
while (true) {
n_get_status((unsigned short)m_LaserCfg->m_Cno, &busy, &position);
if (busy) {
if (listid == 2) {
if (position >= 4000) {
Sleep(10);
}
else {
break;
}
}
else {
if (position < 4000) {
Sleep(10);
}
else {
break;
}
}
}
else {
break;
}
if (m_print_state == BaseCtrl::STOP) {
isbreak = true;
break;
}
}
if (!isbreak)
{
n_set_start_list((unsigned short)m_LaserCfg->m_Cno, listid);
}
}
else {
n_set_start_list((unsigned short)m_LaserCfg->m_Cno, listid);
}
}
void RTC4Scanner::EndList()
{
n_set_end_of_list((unsigned short)m_LaserCfg->m_Cno);
}
void RTC4Scanner::ListExecute(unsigned int listid, bool wait)
{
n_execute_list((unsigned short)m_LaserCfg->m_Cno, (unsigned short)listid);
unsigned short Busy(0), Pos(0);
if (wait) {
do
{
Sleep(20);
n_get_status((unsigned short)m_LaserCfg->m_Cno, &Busy, &Pos);
if (m_print_state == BaseCtrl::STOP) {
break;
}
} while (Busy);
}
}
void RTC4Scanner::AutoChangeList()
{
n_auto_change((unsigned short)m_LaserCfg->m_Cno);
}
void RTC4Scanner::WaitListFree()
{
unsigned short Busy(0), Pos(0);
do
{
Sleep(10);
n_get_status((unsigned short)m_LaserCfg->m_Cno, &Busy, &Pos);
if (m_print_state == BaseCtrl::STOP) {
break;
}
} while (Busy);
}
void RTC4Scanner::SetScanSpeed(double fspeed)
{
double speed = fspeed / 1000.0*m_kfactor;
n_set_mark_speed((unsigned short)m_LaserCfg->m_Cno, speed);
}
void RTC4Scanner::SetPower(double watt)
{
unsigned short power = 1023.0*watt / 100.0;
if (power > 1023)power = 1023;
n_write_da_1_list((unsigned short)m_LaserCfg->m_Cno, power);
}
void RTC4Scanner::AddVector(double startx, double starty, double endx, double endy)
{
int lstartx = (int)round(startx*m_xfactor);
int lstarty = (int)round(starty*m_yfactor);
int lendx = (int)round(endx*m_xfactor);
int lendy = (int)round(endy*m_yfactor);
if (lstartx > SHRT_MAX) {
lstartx = SHRT_MAX;
}
if (lstartx < SHRT_MIN) {
lstartx = SHRT_MIN;
}
if (lstarty > SHRT_MAX) {
lstarty = SHRT_MAX;
}
if (lstarty < SHRT_MIN) {
lstarty = SHRT_MIN;
}
if (lendx > SHRT_MAX)
{
lendx = SHRT_MAX;
}
if (lendx < SHRT_MIN) {
lendx = SHRT_MIN;
}
if (lendy > SHRT_MAX)
{
lendy = SHRT_MAX;
}
if (lendy < SHRT_MIN) {
lendy = SHRT_MIN;
}
n_jump_abs((unsigned short)m_LaserCfg->m_Cno, lstartx, lstarty);
n_mark_abs((unsigned short)m_LaserCfg->m_Cno, lendx, lendy);
}
void RTC4Scanner::ListNop()
{
n_list_nop((unsigned short)m_LaserCfg->m_Cno);
}
void RTC4Scanner::JumpAbs(double x, double y)
{
int lx = (int)round(x*m_xfactor);
int ly = (int)round(y*m_yfactor);
if (lx > SHRT_MAX) {
lx = SHRT_MAX;
}
if (lx < SHRT_MIN)
{
lx = SHRT_MIN;
}
if (ly > SHRT_MAX) {
ly = SHRT_MAX;
}
if (ly < SHRT_MIN)
{
ly = SHRT_MIN;
}
n_jump_abs((unsigned short)m_LaserCfg->m_Cno, lx, ly);
}
void RTC4Scanner::MarkAbs(double x, double y)
{
int lx = (int)round(x*m_xfactor);
int ly = (int)round(y*m_yfactor);
if (lx > SHRT_MAX) {
lx = SHRT_MAX;
}
if (lx < SHRT_MIN) {
lx = SHRT_MIN;
}
if (ly > SHRT_MAX) {
ly = SHRT_MAX;
}
if (ly < SHRT_MIN) {
ly = SHRT_MIN;
}
n_mark_abs((unsigned short)m_LaserCfg->m_Cno, lx, ly);
}
void RTC4Scanner::ScanDebug()
{
unsigned short power = (unsigned short)(1023.0*m_PowerCompensateCfg->CalcPowerCompensate((float)m_ScanTestCfg->m_laser_power) / 100.0);
if (power > 1023)power = 1023;
double markspeed = m_kfactor*m_ScanParamCfg->m_mark_speed / 1000.0;
n_set_start_list((unsigned short)m_LaserCfg->m_Cno, 1);
n_write_da_1_list((unsigned short)m_LaserCfg->m_Cno, power);
n_set_mark_speed((unsigned short)m_LaserCfg->m_Cno, markspeed);
if (m_ScanParamCfg->m_IsDynamicFocus) {
short df = m_ScanTestCfg->m_defocus*m_zfactor;
n_set_defocus_list((unsigned short)m_LaserCfg->m_Cno, df);
}
else {
n_set_defocus_list((unsigned short)m_LaserCfg->m_Cno, 0);
}
n_set_end_of_list((unsigned short)m_LaserCfg->m_Cno);
ListExecute(1, true);
do {
ScanTestProc();
Sleep(20);
} while (m_ScanTestCfg->m_is_cycle && m_DebugFlag);
}
void RTC4Scanner::ScanTestProc()
{
int shapeSize = m_ScanTestCfg->m_shape_size;
switch (m_ScanTestCfg->m_debug_shape) {
case 0: {
double xoffset = m_ScanTestCfg->m_cross_x*cos(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0) - m_ScanTestCfg->m_cross_y*sin(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0);
double yoffset = m_ScanTestCfg->m_cross_x*sin(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0) + m_ScanTestCfg->m_cross_y*cos(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0);
double tempx = xoffset - shapeSize / 2;
double tempy = yoffset + shapeSize / 2;
n_set_start_list((unsigned short)m_LaserCfg->m_Cno, 1);
JumpAbs(tempx, yoffset);
MarkAbs(tempx + shapeSize, yoffset);
JumpAbs(xoffset, tempy);
MarkAbs(xoffset, tempy - shapeSize);
n_set_end_of_list((unsigned short)m_LaserCfg->m_Cno);
ListExecute(1, true);
}break;
case 1: {
float sqlength = (float)shapeSize / 2;
double xoffset = m_ScanTestCfg->m_cross_x*cos(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0) - m_ScanTestCfg->m_cross_y*sin(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0);
double yoffset = m_ScanTestCfg->m_cross_x*sin(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0) + m_ScanTestCfg->m_cross_y*cos(m_CorrectParamCfg->m_angle*MathHelper::m_PI / 180.0);
polygon square[] = {
-sqlength + xoffset, -sqlength + yoffset,
-sqlength + xoffset, sqlength + yoffset,
sqlength + xoffset, sqlength + yoffset,
sqlength + xoffset, -sqlength + yoffset,
-sqlength + xoffset, -sqlength + yoffset
};
int sqsize = (sizeof(square) / sizeof(polygon));
n_set_start_list((unsigned short)m_LaserCfg->m_Cno, 1);
JumpAbs(square[0].xval, square[0].yval);
for (int i = 1; i < sqsize; i++) {
MarkAbs(square[i].xval, square[i].yval);
}
n_set_end_of_list((unsigned short)m_LaserCfg->m_Cno);
ListExecute(1, true);
}break;
case 2: {
n_set_start_list(m_LaserCfg->m_Cno, 1);
n_set_defocus_list(m_LaserCfg->m_Cno, 0);
JumpAbs(m_ScanTestCfg->m_cross_x, m_ScanTestCfg->m_cross_y);
n_set_end_of_list(m_LaserCfg->m_Cno);
ListExecute(1, true);
Sleep(200);
n_laser_signal_on(m_LaserCfg->m_Cno);
DWORD tflag = GetTickCount();
while (m_DebugFlag) {
Sleep(20);
DWORD tnow = GetTickCount();
unsigned int dif = tnow - tflag;
if (dif >= m_ExtCfg->m_TestEmissionTime) {
m_DebugFlag = false;
if (m_ScanTestCfg->m_is_cycle) {
m_ScanTestCfg->m_is_cycle = false;
}
//StopWork();
}
}
n_laser_signal_off(m_LaserCfg->m_Cno);
}break;
case 3: {
n_set_defocus_list((unsigned short)m_LaserCfg->m_Cno, 0);
Sleep(10);
long zlength = n_get_z_distance((unsigned short)m_LaserCfg->m_Cno, m_ScanTestCfg->m_cross_x*m_xfactor, m_ScanTestCfg->m_cross_y*m_yfactor, 0);
if (m_zfactor != 0.0) {
m_ScanTestCfg->m_z_distance = (double)zlength / m_zfactor;
}
}break;
}
}
void RTC4Scanner::UpdateSetting()
{
unsigned short power = 1023.0* m_PowerCompensateCfg->CalcPowerCompensate((float)m_ScanTestCfg->m_laser_power) / 100.0;
if (power > 1023)power = 1023;
unsigned short jumpDelay = m_ScanParamCfg->m_jump_delay / 10;
unsigned short markDelay = m_ScanParamCfg->m_scan_delay / 10;
unsigned short polygonDelay = m_ScanParamCfg->m_polygon_delay / 10;
double markspeed = m_kfactor* m_ScanParamCfg->m_mark_speed / 1000.0;
double jumpspeed = m_kfactor* m_ScanParamCfg->m_jump_speed / 1000.0;
unsigned short edgeLevel = m_ScanParamCfg->m_edge_level / 10;
unsigned short minJumpDelay = m_ScanParamCfg->m_min_jump_delay / 10;
n_set_start_list((unsigned short)m_LaserCfg->m_Cno, 1);
n_write_da_1_list((unsigned short)m_LaserCfg->m_Cno, power);
n_set_scanner_delays((unsigned short)m_LaserCfg->m_Cno, jumpDelay, markDelay, polygonDelay);
n_set_laser_delays((unsigned short)m_LaserCfg->m_Cno, (short)m_ScanParamCfg->m_laseron_delay, (short)m_ScanParamCfg->m_laseroff_delay);
n_set_delay_mode((unsigned short)m_LaserCfg->m_Cno, 1, 0, edgeLevel, minJumpDelay, (unsigned int)(m_ScanParamCfg->m_jump_length_limit*m_kfactor));
n_set_jump_speed((unsigned short)m_LaserCfg->m_Cno, jumpspeed);
n_set_mark_speed((unsigned short)m_LaserCfg->m_Cno, markspeed);
n_set_end_of_list((unsigned short)m_LaserCfg->m_Cno);
ListExecute(1, true);
}
void RTC4Scanner::SetXyOffset(float x, float y)
{
short bitx = x*m_xfactor*m_scaleX;
short bity = y*m_yfactor*m_scaleY;
n_set_offset((unsigned short)m_LaserCfg->m_Cno, bitx, bity);
}
void RTC4Scanner::SetAngle(double angle)
{
double m11 = cos(angle*MathHelper::m_PI / 180.0);
double m12 = -sin(angle*MathHelper::m_PI / 180.0);
double m21 = sin(angle*MathHelper::m_PI / 180.0);
double m22 = cos(angle*MathHelper::m_PI / 180.0);
n_set_matrix((unsigned short)m_LaserCfg->m_Cno, m11, m12, m21, m22);
}

View File

@ -0,0 +1,45 @@
#pragma once
#include "Scanner.h"
class RTC4Scanner : public Scanner
{
public:
RTC4Scanner(LaserCfg* cfg);
~RTC4Scanner();
bool Init();
bool StopWork();
static bool PreInit(unsigned int &card_count);
static int GetSerialNo(unsigned int no);
void SetK(double k) {
m_kfactor = k;
m_xfactor = m_kfactor*m_CorrectParamCfg->m_xcorrect;
m_yfactor = m_kfactor*m_CorrectParamCfg->m_ycorrect;
}
private:
void LoadList(unsigned int listid, bool wait);
void EndList();
void ListExecute(unsigned int listid, bool wait);
void AutoChangeList();
void WaitListFree();
void SetScanSpeed(double value);
void SetPower(double watt);
void SetDefocus(float value) {}
void AddVector(double startx, double starty, double endx, double endy);
void ListNop();
void JumpAbs(double x, double y);
void MarkAbs(double x, double y);
unsigned int GetMemorySize() { return m_list_memory; }
void ScanDebug();
void UpdateSetting();
void SetXyOffset(float x, float y);
void SetAngle(double angle);
void ScanTestProc();
};

View File

@ -0,0 +1,338 @@
//-----------------------------------------------------------------------------
// File: RTC4impl.h Copyright (c) 2018 SCANLAB GmbH
//-----------------------------------------------------------------------------
//
//
//
// Abstract
// RTC4 function prototypes for implicitly linking - also known as
// static load linking - to the RTC4DLL.DLL or RTC4DLLx64.DLL.
//
// Authors
// Gerald Schmid, Bernhard Schrems, Christian Lutz
//
// Revision History
// +-----+---------+--------+------------------------------------------+
// | Mod | Date | Author | Description |
// +-----+---------+--------+------------------------------------------+
// | 0.0 | 13Dec00 | GS | * initial release |
// | 0.1 | 10Jan01 | BS | * standard calling |
// | 0.2 | 10Jan01 | BS | * use of const in parameter declarations |
// | 0.3 | 18Jun15 | CLU | * include guard |
// | 0.4 | 15Dec15 | BS,CLU | * 64bit compatibility |
// | 0.5 | 29Sep16 | CLU | * Company name updated |
// | | | | |
// +-----+---------+--------+------------------------------------------+
//
// This file was automatically generated on Mrz 28, 2018.
//
// NOTE
// You need to link the (Visual C++) import library RTC4DLL.LIB or
// RTC4DLLx64.LIB for building a Win32 or a Win64 application
// respectively.
//
//-----------------------------------------------------------------------------
#pragma once
__declspec(dllimport) short __stdcall getmemory(unsigned short adr);
__declspec(dllimport) void __stdcall n_get_waveform(unsigned short n, unsigned short channel, unsigned short istop, signed short *memptr);
__declspec(dllimport) void __stdcall get_waveform(unsigned short channel, unsigned short istop, signed short *memptr);
__declspec(dllimport) void __stdcall n_measurement_status(unsigned short n, unsigned short *busy, unsigned short *position);
__declspec(dllimport) void __stdcall measurement_status(unsigned short *busy, unsigned short *position);
__declspec(dllimport) short __stdcall n_load_varpolydelay(unsigned short n, const char* stbfilename, unsigned short tableno);
__declspec(dllimport) short __stdcall load_varpolydelay(const char* stbfilename, unsigned short tableno);
__declspec(dllimport) short __stdcall n_load_program_file(unsigned short n, const char* name);
__declspec(dllimport) short __stdcall load_program_file(const char* name);
__declspec(dllimport) short __stdcall n_load_correction_file(unsigned short n, const char* filename, short cortable, double kx, double ky, double phi, double xoffset, double yoffset);
__declspec(dllimport) short __stdcall load_correction_file(const char* filename, short cortable, double kx, double ky, double phi, double xoffset, double yoffset);
__declspec(dllimport) short __stdcall n_load_z_table(unsigned short n, double a, double b, double c);
__declspec(dllimport) short __stdcall load_z_table(double a, double b, double c);
__declspec(dllimport) void __stdcall n_list_nop(unsigned short n);
__declspec(dllimport) void __stdcall list_nop(void);
__declspec(dllimport) void __stdcall n_set_end_of_list(unsigned short n);
__declspec(dllimport) void __stdcall set_end_of_list(void);
__declspec(dllimport) void __stdcall n_jump_abs_3d(unsigned short n, short x, short y, short z);
__declspec(dllimport) void __stdcall jump_abs_3d(short x, short y, short z);
__declspec(dllimport) void __stdcall n_jump_abs(unsigned short n, short x, short y);
__declspec(dllimport) void __stdcall jump_abs(short x, short y);
__declspec(dllimport) void __stdcall n_mark_abs_3d(unsigned short n, short x, short y, short z);
__declspec(dllimport) void __stdcall mark_abs_3d(short x, short y, short z);
__declspec(dllimport) void __stdcall n_mark_abs(unsigned short n, short x, short y);
__declspec(dllimport) void __stdcall mark_abs(short x, short y);
__declspec(dllimport) void __stdcall n_jump_rel_3d(unsigned short n, short dx, short dy, short dz);
__declspec(dllimport) void __stdcall jump_rel_3d(short dx, short dy, short dz);
__declspec(dllimport) void __stdcall n_jump_rel(unsigned short n, short dx, short dy);
__declspec(dllimport) void __stdcall jump_rel(short dx, short dy);
__declspec(dllimport) void __stdcall n_mark_rel_3d(unsigned short n, short dx, short dy, short dz);
__declspec(dllimport) void __stdcall mark_rel_3d(short dx, short dy, short dz);
__declspec(dllimport) void __stdcall n_mark_rel(unsigned short n, short dx, short dy);
__declspec(dllimport) void __stdcall mark_rel(short dx, short dy);
__declspec(dllimport) void __stdcall n_write_8bit_port_list(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_8bit_port_list(unsigned short value);
__declspec(dllimport) void __stdcall n_write_da_1_list(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_da_1_list(unsigned short value);
__declspec(dllimport) void __stdcall n_write_da_2_list(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_da_2_list(unsigned short value);
__declspec(dllimport) void __stdcall n_set_matrix_list(unsigned short n, unsigned short i, unsigned short j, double mij);
__declspec(dllimport) void __stdcall set_matrix_list(unsigned short i, unsigned short j, double mij);
__declspec(dllimport) void __stdcall n_set_defocus_list(unsigned short n, short value);
__declspec(dllimport) void __stdcall set_defocus_list(short value);
__declspec(dllimport) void __stdcall n_set_control_mode_list(unsigned short n, unsigned short mode);
__declspec(dllimport) void __stdcall set_control_mode_list(unsigned short mode);
__declspec(dllimport) void __stdcall n_set_offset_list(unsigned short n, short xoffset, short yoffset);
__declspec(dllimport) void __stdcall set_offset_list(short xoffset, short yoffset);
__declspec(dllimport) void __stdcall n_long_delay(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall long_delay(unsigned short value);
__declspec(dllimport) void __stdcall n_laser_on_list(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall laser_on_list(unsigned short value);
__declspec(dllimport) void __stdcall n_set_jump_speed(unsigned short n, double speed);
__declspec(dllimport) void __stdcall set_jump_speed(double speed);
__declspec(dllimport) void __stdcall n_set_mark_speed(unsigned short n, double speed);
__declspec(dllimport) void __stdcall set_mark_speed(double speed);
__declspec(dllimport) void __stdcall n_set_laser_delays(unsigned short n, short ondelay, short offdelay);
__declspec(dllimport) void __stdcall set_laser_delays(short ondelay, short offdelay);
__declspec(dllimport) void __stdcall n_set_scanner_delays(unsigned short n, unsigned short jumpdelay, unsigned short markdelay, unsigned short polydelay);
__declspec(dllimport) void __stdcall set_scanner_delays(unsigned short jumpdelay, unsigned short markdelay, unsigned short polydelay);
__declspec(dllimport) void __stdcall n_set_list_jump(unsigned short n, unsigned short position);
__declspec(dllimport) void __stdcall set_list_jump(unsigned short position);
__declspec(dllimport) void __stdcall n_set_input_pointer(unsigned short n, unsigned short pointer);
__declspec(dllimport) void __stdcall set_input_pointer(unsigned short pointer);
__declspec(dllimport) void __stdcall n_list_call(unsigned short n, unsigned short position);
__declspec(dllimport) void __stdcall list_call(unsigned short position);
__declspec(dllimport) void __stdcall n_list_return(unsigned short n);
__declspec(dllimport) void __stdcall list_return(void);
__declspec(dllimport) void __stdcall n_z_out_list(unsigned short n, short z);
__declspec(dllimport) void __stdcall z_out_list(short z);
__declspec(dllimport) void __stdcall n_set_standby_list(unsigned short n, unsigned short half_period, unsigned short pulse);
__declspec(dllimport) void __stdcall set_standby_list(unsigned short half_period, unsigned short pulse);
__declspec(dllimport) void __stdcall n_timed_jump_abs(unsigned short n, short x, short y, double time);
__declspec(dllimport) void __stdcall timed_jump_abs(short x, short y, double time);
__declspec(dllimport) void __stdcall n_timed_mark_abs(unsigned short n, short x, short y, double time);
__declspec(dllimport) void __stdcall timed_mark_abs(short x, short y, double time);
__declspec(dllimport) void __stdcall n_timed_jump_rel(unsigned short n, short dx, short dy, double time);
__declspec(dllimport) void __stdcall timed_jump_rel(short dx, short dy, double time);
__declspec(dllimport) void __stdcall n_timed_mark_rel(unsigned short n, short dx, short dy, double time);
__declspec(dllimport) void __stdcall timed_mark_rel(short dx, short dy, double time);
__declspec(dllimport) void __stdcall n_set_laser_timing(unsigned short n, unsigned short halfperiod, unsigned short pulse1, unsigned short pulse2, unsigned short timebase);
__declspec(dllimport) void __stdcall set_laser_timing(unsigned short halfperiod, unsigned short pulse1, unsigned short pulse2, unsigned short timebase);
__declspec(dllimport) void __stdcall n_set_wobbel_xy(unsigned short n, unsigned short long_wob, unsigned short trans_wob, double frequency);
__declspec(dllimport) void __stdcall set_wobbel_xy(unsigned short long_wob, unsigned short trans_wob, double frequency);
__declspec(dllimport) void __stdcall n_set_wobbel(unsigned short n, unsigned short amplitude, double frequency);
__declspec(dllimport) void __stdcall set_wobbel(unsigned short amplitude, double frequency);
__declspec(dllimport) void __stdcall n_set_fly_x(unsigned short n, double kx);
__declspec(dllimport) void __stdcall set_fly_x(double kx);
__declspec(dllimport) void __stdcall n_set_fly_y(unsigned short n, double ky);
__declspec(dllimport) void __stdcall set_fly_y(double ky);
__declspec(dllimport) void __stdcall n_set_fly_rot(unsigned short n, double resolution);
__declspec(dllimport) void __stdcall set_fly_rot(double resolution);
__declspec(dllimport) void __stdcall n_fly_return(unsigned short n, short x, short y);
__declspec(dllimport) void __stdcall fly_return(short x, short y);
__declspec(dllimport) void __stdcall n_calculate_fly(unsigned short n, unsigned short direction, double distance);
__declspec(dllimport) void __stdcall calculate_fly(unsigned short direction, double distance);
__declspec(dllimport) void __stdcall n_write_io_port_list(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_io_port_list(unsigned short value);
__declspec(dllimport) void __stdcall n_select_cor_table_list(unsigned short n, unsigned short heada, unsigned short headb);
__declspec(dllimport) void __stdcall select_cor_table_list(unsigned short heada, unsigned short headb);
__declspec(dllimport) void __stdcall n_set_wait(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall set_wait(unsigned short value);
__declspec(dllimport) void __stdcall n_simulate_ext_start(unsigned short n, short delay, short encoder);
__declspec(dllimport) void __stdcall simulate_ext_start(short delay, short encoder);
__declspec(dllimport) void __stdcall n_write_da_x_list(unsigned short n, unsigned short x, unsigned short value);
__declspec(dllimport) void __stdcall write_da_x_list(unsigned short x, unsigned short value);
__declspec(dllimport) void __stdcall n_set_pixel_line(unsigned short n, unsigned short pixelmode, unsigned short pixelperiod, double dx, double dy);
__declspec(dllimport) void __stdcall set_pixel_line(unsigned short pixelmode, unsigned short pixelperiod, double dx, double dy);
__declspec(dllimport) void __stdcall n_set_pixel(unsigned short n, unsigned short pulswidth, unsigned short davalue, unsigned short adchannel);
__declspec(dllimport) void __stdcall set_pixel(unsigned short pulswidth, unsigned short davalue, unsigned short adchannel);
__declspec(dllimport) void __stdcall n_set_extstartpos_list(unsigned short n, unsigned short position);
__declspec(dllimport) void __stdcall set_extstartpos_list(unsigned short position);
__declspec(dllimport) void __stdcall n_laser_signal_on_list(unsigned short n);
__declspec(dllimport) void __stdcall laser_signal_on_list(void);
__declspec(dllimport) void __stdcall n_laser_signal_off_list(unsigned short n);
__declspec(dllimport) void __stdcall laser_signal_off_list(void);
__declspec(dllimport) void __stdcall n_set_firstpulse_killer_list(unsigned short n, unsigned short fpk);
__declspec(dllimport) void __stdcall set_firstpulse_killer_list(unsigned short fpk);
__declspec(dllimport) void __stdcall n_set_io_cond_list(unsigned short n, unsigned short mask_1, unsigned short mask_0, unsigned short mask_set);
__declspec(dllimport) void __stdcall set_io_cond_list(unsigned short mask_1, unsigned short mask_0, unsigned short mask_set);
__declspec(dllimport) void __stdcall n_clear_io_cond_list(unsigned short n, unsigned short mask_1, unsigned short mask_0, unsigned short mask_clear);
__declspec(dllimport) void __stdcall clear_io_cond_list(unsigned short mask_1, unsigned short mask_0, unsigned short mask_clear);
__declspec(dllimport) void __stdcall n_list_jump_cond(unsigned short n, unsigned short mask_1, unsigned short mask_0, unsigned short position);
__declspec(dllimport) void __stdcall list_jump_cond(unsigned short mask_1, unsigned short mask_0, unsigned short position);
__declspec(dllimport) void __stdcall n_list_call_cond(unsigned short n, unsigned short mask_1, unsigned short mask_0, unsigned short position);
__declspec(dllimport) void __stdcall list_call_cond(unsigned short mask_1, unsigned short mask_0, unsigned short position);
__declspec(dllimport) void __stdcall n_save_and_restart_timer(unsigned short n);
__declspec(dllimport) void __stdcall save_and_restart_timer(void);
__declspec(dllimport) void __stdcall n_set_ext_start_delay_list(unsigned short n, short delay, short encoder);
__declspec(dllimport) void __stdcall set_ext_start_delay_list(short delay, short encoder);
__declspec(dllimport) void __stdcall n_set_trigger(unsigned short n, unsigned short sampleperiod, unsigned short channel1, unsigned short channel2);
__declspec(dllimport) void __stdcall set_trigger(unsigned short sampleperiod, unsigned short signal1, unsigned short signal2);
__declspec(dllimport) void __stdcall n_arc_rel(unsigned short n, short dx, short dy, double angle);
__declspec(dllimport) void __stdcall arc_rel(short dx, short dy, double angle);
__declspec(dllimport) void __stdcall n_arc_abs(unsigned short n, short x, short y, double angle);
__declspec(dllimport) void __stdcall arc_abs(short x, short y, double angle);
__declspec(dllimport) void __stdcall drilling(short pulsewidth, short relencoderdelay);
__declspec(dllimport) void __stdcall regulation(void);
__declspec(dllimport) void __stdcall flyline(short encoderdelay);
__declspec(dllimport) unsigned short __stdcall n_get_input_pointer(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_input_pointer(void);
__declspec(dllimport) void __stdcall select_rtc(unsigned short cardno);
__declspec(dllimport) unsigned short __stdcall rtc4_count_cards(void);
__declspec(dllimport) void __stdcall n_get_status(unsigned short n, unsigned short *busy, unsigned short *position);
__declspec(dllimport) void __stdcall get_status(unsigned short *busy, unsigned short *position);
__declspec(dllimport) unsigned short __stdcall n_read_status(unsigned short n);
__declspec(dllimport) unsigned short __stdcall read_status(void);
__declspec(dllimport) unsigned short __stdcall n_get_startstop_info(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_startstop_info(void);
__declspec(dllimport) unsigned short __stdcall n_get_marking_info(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_marking_info(void);
__declspec(dllimport) unsigned short __stdcall get_dll_version(void);
__declspec(dllimport) void __stdcall n_set_start_list_1(unsigned short n);
__declspec(dllimport) void __stdcall set_start_list_1(void);
__declspec(dllimport) void __stdcall n_set_start_list_2(unsigned short n);
__declspec(dllimport) void __stdcall set_start_list_2(void);
__declspec(dllimport) void __stdcall n_set_start_list(unsigned short n, unsigned short listno);
__declspec(dllimport) void __stdcall set_start_list(unsigned short listno);
__declspec(dllimport) void __stdcall n_execute_list_1(unsigned short n);
__declspec(dllimport) void __stdcall execute_list_1(void);
__declspec(dllimport) void __stdcall n_execute_list_2(unsigned short n);
__declspec(dllimport) void __stdcall execute_list_2(void);
__declspec(dllimport) void __stdcall n_execute_list(unsigned short n, unsigned short listno);
__declspec(dllimport) void __stdcall execute_list(unsigned short listno);
__declspec(dllimport) void __stdcall n_write_8bit_port(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_8bit_port(unsigned short value);
__declspec(dllimport) void __stdcall n_write_io_port(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_io_port(unsigned short value);
__declspec(dllimport) void __stdcall n_auto_change(unsigned short n);
__declspec(dllimport) void __stdcall auto_change(void);
__declspec(dllimport) void __stdcall n_auto_change_pos(unsigned short n, unsigned short start);
__declspec(dllimport) void __stdcall auto_change_pos(unsigned short start);
__declspec(dllimport) void __stdcall aut_change(void);
__declspec(dllimport) void __stdcall n_start_loop(unsigned short n);
__declspec(dllimport) void __stdcall start_loop(void);
__declspec(dllimport) void __stdcall n_quit_loop(unsigned short n);
__declspec(dllimport) void __stdcall quit_loop(void);
__declspec(dllimport) void __stdcall n_set_list_mode(unsigned short n, unsigned short mode);
__declspec(dllimport) void __stdcall set_list_mode(unsigned short mode);
__declspec(dllimport) void __stdcall n_stop_execution(unsigned short n);
__declspec(dllimport) void __stdcall stop_execution(void);
__declspec(dllimport) unsigned short __stdcall n_read_io_port(unsigned short n);
__declspec(dllimport) unsigned short __stdcall read_io_port(void);
__declspec(dllimport) void __stdcall n_write_da_1(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_da_1(unsigned short value);
__declspec(dllimport) void __stdcall n_write_da_2(unsigned short n, unsigned short value);
__declspec(dllimport) void __stdcall write_da_2(unsigned short value);
__declspec(dllimport) void __stdcall n_set_max_counts(unsigned short n, long counts);
__declspec(dllimport) void __stdcall set_max_counts(long counts);
__declspec(dllimport) long __stdcall n_get_counts(unsigned short n);
__declspec(dllimport) long __stdcall get_counts(void);
__declspec(dllimport) void __stdcall n_set_matrix(unsigned short n, double m11, double m12, double m21, double m22);
__declspec(dllimport) void __stdcall set_matrix(double m11, double m12, double m21, double m22);
__declspec(dllimport) void __stdcall n_set_offset(unsigned short n, short xoffset, short yoffset);
__declspec(dllimport) void __stdcall set_offset(short xoffset, short yoffset);
__declspec(dllimport) void __stdcall n_goto_xyz(unsigned short n, short x, short y, short z);
__declspec(dllimport) void __stdcall goto_xyz(short x, short y, short z);
__declspec(dllimport) void __stdcall n_goto_xy(unsigned short n, short x, short y);
__declspec(dllimport) void __stdcall goto_xy(short x, short y);
__declspec(dllimport) unsigned short __stdcall n_get_hex_version(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_hex_version(void);
__declspec(dllimport) void __stdcall n_disable_laser(unsigned short n);
__declspec(dllimport) void __stdcall disable_laser(void);
__declspec(dllimport) void __stdcall n_enable_laser(unsigned short n);
__declspec(dllimport) void __stdcall enable_laser(void);
__declspec(dllimport) void __stdcall n_stop_list(unsigned short n);
__declspec(dllimport) void __stdcall stop_list(void);
__declspec(dllimport) void __stdcall n_restart_list(unsigned short n);
__declspec(dllimport) void __stdcall restart_list(void);
__declspec(dllimport) void __stdcall n_get_xyz_pos(unsigned short n, short *x, short *y, short *z);
__declspec(dllimport) void __stdcall get_xyz_pos(short *x, short *y, short *z);
__declspec(dllimport) void __stdcall n_get_xy_pos(unsigned short n, short *x, short *y);
__declspec(dllimport) void __stdcall get_xy_pos(short *x, short *y);
__declspec(dllimport) void __stdcall n_select_list(unsigned short n, unsigned short list_2);
__declspec(dllimport) void __stdcall select_list(unsigned short list_2);
__declspec(dllimport) void __stdcall n_z_out(unsigned short n, short z);
__declspec(dllimport) void __stdcall z_out(short z);
__declspec(dllimport) void __stdcall n_set_firstpulse_killer(unsigned short n, unsigned short fpk);
__declspec(dllimport) void __stdcall set_firstpulse_killer(unsigned short fpk);
__declspec(dllimport) void __stdcall n_set_standby(unsigned short n, unsigned short half_period, unsigned short pulse);
__declspec(dllimport) void __stdcall set_standby(unsigned short half_period, unsigned short pulse);
__declspec(dllimport) void __stdcall n_laser_signal_on(unsigned short n);
__declspec(dllimport) void __stdcall laser_signal_on(void);
__declspec(dllimport) void __stdcall n_laser_signal_off(unsigned short n);
__declspec(dllimport) void __stdcall laser_signal_off(void);
__declspec(dllimport) void __stdcall n_set_delay_mode(unsigned short n, unsigned short varpoly, unsigned short directmove3d, unsigned short edgelevel, unsigned short minjumpdelay, unsigned short jumplengthlimit);
__declspec(dllimport) void __stdcall set_delay_mode(unsigned short varpoly, unsigned short directmove3d, unsigned short edgelevel, unsigned short minjumpdelay, unsigned short jumplengthlimit);
__declspec(dllimport) void __stdcall n_set_piso_control(unsigned short n, unsigned short l1, unsigned short l2);
__declspec(dllimport) void __stdcall set_piso_control(unsigned short l1, unsigned short l2);
__declspec(dllimport) void __stdcall n_select_status(unsigned short n, unsigned short mode);
__declspec(dllimport) void __stdcall select_status(unsigned short mode);
__declspec(dllimport) void __stdcall n_get_encoder(unsigned short n, short *zx, short *zy);
__declspec(dllimport) void __stdcall get_encoder(short *zx, short *zy);
__declspec(dllimport) void __stdcall n_select_cor_table(unsigned short n, unsigned short heada, unsigned short headb);
__declspec(dllimport) void __stdcall select_cor_table(unsigned short heada, unsigned short headb);
__declspec(dllimport) void __stdcall n_execute_at_pointer(unsigned short n, unsigned short position);
__declspec(dllimport) void __stdcall execute_at_pointer(unsigned short position);
__declspec(dllimport) unsigned short __stdcall n_get_head_status(unsigned short n, unsigned short head);
__declspec(dllimport) unsigned short __stdcall get_head_status(unsigned short head);
__declspec(dllimport) void __stdcall n_simulate_encoder(unsigned short n, unsigned short channel);
__declspec(dllimport) void __stdcall simulate_encoder(unsigned short channel);
__declspec(dllimport) void __stdcall n_set_hi(unsigned short n, double galvogainx, double galvogainy, short galvooffsetx, short galvooffsety, short head);
__declspec(dllimport) void __stdcall set_hi(double galvogainx, double galvogainy, short galvooffsetx, short galvooffsety, short head);
__declspec(dllimport) void __stdcall n_release_wait(unsigned short n);
__declspec(dllimport) void __stdcall release_wait(void);
__declspec(dllimport) unsigned short __stdcall n_get_wait_status(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_wait_status(void);
__declspec(dllimport) void __stdcall n_set_control_mode(unsigned short n, unsigned short mode);
__declspec(dllimport) void __stdcall set_control_mode(unsigned short mode);
__declspec(dllimport) void __stdcall n_set_laser_mode(unsigned short n, unsigned short mode);
__declspec(dllimport) void __stdcall set_laser_mode(unsigned short mode);
__declspec(dllimport) void __stdcall n_set_ext_start_delay(unsigned short n, short delay, short encoder);
__declspec(dllimport) void __stdcall set_ext_start_delay(short delay, short encoder);
__declspec(dllimport) void __stdcall n_home_position(unsigned short n, short xhome, short yhome);
__declspec(dllimport) void __stdcall home_position(short xhome, short yhome);
__declspec(dllimport) void __stdcall n_set_rot_center(unsigned short n, long center_x, long center_y);
__declspec(dllimport) void __stdcall set_rot_center(long center_x, long center_y);
__declspec(dllimport) void __stdcall n_dsp_start(unsigned short n);
__declspec(dllimport) void __stdcall dsp_start(void);
__declspec(dllimport) void __stdcall n_write_da_x(unsigned short n, unsigned short x, unsigned short value);
__declspec(dllimport) void __stdcall write_da_x(unsigned short x, unsigned short value);
__declspec(dllimport) unsigned short __stdcall n_read_ad_x(unsigned short n, unsigned short x);
__declspec(dllimport) unsigned short __stdcall read_ad_x(unsigned short x);
__declspec(dllimport) unsigned short __stdcall n_read_pixel_ad(unsigned short n, unsigned short pos);
__declspec(dllimport) unsigned short __stdcall read_pixel_ad(unsigned short pos);
__declspec(dllimport) short __stdcall n_get_z_distance(unsigned short n, short x, short y, short z);
__declspec(dllimport) short __stdcall get_z_distance(short x, short y, short z);
__declspec(dllimport) unsigned short __stdcall n_get_io_status(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_io_status(void);
__declspec(dllimport) double __stdcall n_get_time(unsigned short n);
__declspec(dllimport) double __stdcall get_time(void);
__declspec(dllimport) void __stdcall n_set_defocus(unsigned short n, short value);
__declspec(dllimport) void __stdcall set_defocus(short value);
__declspec(dllimport) void __stdcall n_set_softstart_mode(unsigned short n, unsigned short mode, unsigned short number, unsigned short restartdelay);
__declspec(dllimport) void __stdcall set_softstart_mode(unsigned short mode, unsigned short number, unsigned short resetdelay);
__declspec(dllimport) void __stdcall n_set_softstart_level(unsigned short n, unsigned short index, unsigned short level);
__declspec(dllimport) void __stdcall set_softstart_level(unsigned short index, unsigned short level);
__declspec(dllimport) void __stdcall n_control_command(unsigned short n, unsigned short head, unsigned short axis, unsigned short data);
__declspec(dllimport) void __stdcall control_command(unsigned short head, unsigned short axis, unsigned short data);
__declspec(dllimport) short __stdcall load_cor(const char* filename);
__declspec(dllimport) short __stdcall load_pro(const char* filename);
__declspec(dllimport) unsigned short __stdcall n_get_serial_number(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_serial_number(void);
__declspec(dllimport) long __stdcall n_get_serial_number_32(unsigned short n);
__declspec(dllimport) long __stdcall get_serial_number_32(void);
__declspec(dllimport) unsigned short __stdcall n_get_rtc_version(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_rtc_version(void);
__declspec(dllimport) void __stdcall get_hi_data(unsigned short *x1, unsigned short *x2, unsigned short *y1, unsigned short *y2);
__declspec(dllimport) short __stdcall n_auto_cal(unsigned short n, unsigned short head, unsigned short command);
__declspec(dllimport) short __stdcall auto_cal(unsigned short head, unsigned short command);
__declspec(dllimport) unsigned short __stdcall n_get_list_space(unsigned short n);
__declspec(dllimport) unsigned short __stdcall get_list_space(void);
__declspec(dllimport) short __stdcall teachin(const char* filename, short xin, short yin, short zin, double ll0, short *xout, short *yout, short *zout);
__declspec(dllimport) short __stdcall n_get_value(unsigned short n, unsigned short signal);
__declspec(dllimport) short __stdcall get_value(unsigned short signal);
__declspec(dllimport) void __stdcall n_set_io_bit(unsigned short n, unsigned short mask1);
__declspec(dllimport) void __stdcall set_io_bit(unsigned short mask1);
__declspec(dllimport) void __stdcall n_clear_io_bit(unsigned short n, unsigned short mask0);
__declspec(dllimport) void __stdcall clear_io_bit(unsigned short mask0);
__declspec(dllimport) void __stdcall set_duty_cycle_table(unsigned short index, unsigned short dutycycle);
__declspec(dllimport) void __stdcall n_move_to(unsigned short n, unsigned short position);
__declspec(dllimport) void __stdcall move_to(unsigned short position);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,77 @@
#pragma once
#include "Scanner.h"
class RTC5Scanner : public Scanner
{
public:
RTC5Scanner(ScannerControlCfg* cfg);
~RTC5Scanner();
bool Init();
bool StopWork();
static bool PreInit(unsigned int &card_count);
static void Uninit();
void SetK(double k) {
if (!m_CorrectParamCfg->m_IsCorrectFile3D) {
m_kfactor = k;
m_xfactor = m_kfactor*m_CorrectParamCfg->m_xcorrect;
m_yfactor = m_kfactor*m_CorrectParamCfg->m_ycorrect;
m_XOffsetAssist = m_CorrectParamCfg->m_xposfix *m_xfactor;
m_YOffsetAssist = m_CorrectParamCfg->m_yposfix *m_yfactor;
}
}
void UpdateScanParamByCfg(ScanParamCfg* cfg);
protected:
void HeatingScannerRun();
void ScannerInfoRun();
void UpdateScannerInfo();
void CheckAlarm();
private:
void LoadList(unsigned int listid, bool wait);
void EndList();
void ListExecute(unsigned int listid, bool wait);
void AutoChangeList();
void WaitListFree();
void SetScanSpeed(double value);
void SetPower(double watt);
void SetDefocus(float value);
void ResetDefocus();
void AddVector(double startx, double starty, double endx, double endy);
void ListNop();
void JumpAbs(double x, double y);
void MarkAbs(double x, double y);
unsigned int GetMemorySize() { return m_list_memory; }
void ScanDebug();
void UpdateSetting();
void SetXyOffset(float x, float y);
void SetAngle(double angle);
void UpdateSkyWriting(bool islist);
void GetInfo(vector<string> &ins);
void SetSkyWritingEnable(bool benable, bool islist);
void ScanTestProc();
private:
const uint32_t ScanStatusAddr = 0x0500;
const uint32_t ActualPositionAddr = 0x0501;
const uint32_t SetPositionAddr = 0x0502;
const uint32_t PositionErrorAddr = 0x0503;
const uint32_t ActualCurrentAddr = 0x0504;
const uint32_t ActualVelocityAddr = 0x0506;
const uint32_t GalvanometerScannerTempAddr = 0x0514;
const uint32_t ServoBoardTempAddr = 0x0515;
const uint32_t PDSupplyVoltageAddr = 0x0516;
const uint32_t DSPCoreSupplyVoltageAddr = 0x0517;
const uint32_t DSPIOVoltageAddr = 0x0518;
const uint32_t AnalogSectionVoltageAddr = 0x0519;
const uint32_t ADConverterSupplyVoltageAddr = 0x051A;
const uint32_t PDSupplyCurrentAddr = 0x051B;
const uint32_t FirmwareVersionAddr = 0x0522;
const uint32_t CurrentOperationStateLowAddr = 0x0528;
const uint32_t CurrentOperationStateHighAddr = 0x0529;
const uint32_t StopEventCode = 0x052A;
};

View File

@ -0,0 +1,915 @@
//-----------------------------------------------------------------------------
// File: RTC5impl.hpp
//-----------------------------------------------------------------------------
//
// Abstract
// RTC5 function prototypes for implicitly linking - also known as
// static load linking - to the RTC5DLL.DLL or libslrtc5.so.
//
// This file was automatically generated on Jan 8, 2019
//
// NOTE
// On Windows platforms for building an executable, you must link with
// the (Visual C++) import library RTC5DLL.LIB.
//
//-----------------------------------------------------------------------------
#pragma once
#if defined(__cplusplus)
extern "C" {
#endif //defined(__cplusplus)
#ifdef _WIN32
#include <windows.h>
#if !defined(ULONG_PTR) // usually defined in <BaseTsd.h>
#if !defined(_WIN64)
#define ULONG_PTR UINT
#else
#define ULONG_PTR UINT64
#endif // !defined(_WIN64)
#endif // !defined(ULONG_PTR)
#else
#include <stdint.h>
typedef int32_t LONG; // LONG is assumed to be 4 Bytes
typedef uint32_t UINT; // UINT is assumed to be 4 Bytes
typedef uintptr_t ULONG_PTR;
#define __stdcall
#endif
#ifdef _WIN32
#define RTC5_API __declspec(dllimport)
#else
#define RTC5_API
#endif
RTC5_API UINT __stdcall init_rtc5_dll(void);
RTC5_API void __stdcall free_rtc5_dll(void);
RTC5_API void __stdcall set_rtc4_mode(void);
RTC5_API void __stdcall set_rtc5_mode(void);
RTC5_API UINT __stdcall get_rtc_mode(void);
RTC5_API UINT __stdcall n_get_error(const UINT CardNo);
RTC5_API UINT __stdcall n_get_last_error(const UINT CardNo);
RTC5_API void __stdcall n_reset_error(const UINT CardNo, const UINT Code);
RTC5_API UINT __stdcall n_set_verify(const UINT CardNo, const UINT Verify);
RTC5_API UINT __stdcall get_error(void);
RTC5_API UINT __stdcall get_last_error(void);
RTC5_API void __stdcall reset_error(const UINT Code);
RTC5_API UINT __stdcall set_verify(const UINT Verify);
RTC5_API UINT __stdcall verify_checksum(const char* Name);
RTC5_API UINT __stdcall read_abc_from_file(const char* Name, double& A, double& B, double& C);
RTC5_API UINT __stdcall write_abc_to_file(const char* Name, const double A, const double B, const double C);
RTC5_API UINT __stdcall rtc5_count_cards(void);
RTC5_API UINT __stdcall acquire_rtc(const UINT CardNo);
RTC5_API UINT __stdcall release_rtc(const UINT CardNo);
RTC5_API UINT __stdcall select_rtc(const UINT CardNo);
RTC5_API UINT __stdcall get_dll_version(void);
RTC5_API UINT __stdcall n_get_serial_number(const UINT CardNo);
RTC5_API UINT __stdcall n_get_hex_version(const UINT CardNo);
RTC5_API UINT __stdcall n_get_rtc_version(const UINT CardNo);
RTC5_API UINT __stdcall get_serial_number(void);
RTC5_API UINT __stdcall get_hex_version(void);
RTC5_API UINT __stdcall get_rtc_version(void);
RTC5_API UINT __stdcall n_load_program_file(const UINT CardNo, const char* Path);
RTC5_API void __stdcall n_sync_slaves(const UINT CardNo);
RTC5_API UINT __stdcall n_get_sync_status(const UINT CardNo);
RTC5_API UINT __stdcall n_load_correction_file(const UINT CardNo, const char* Name, const UINT No, const UINT Dim);
RTC5_API UINT __stdcall n_load_zoom_correction_file(const UINT CardNo, const char* Name, const UINT No);
RTC5_API UINT __stdcall n_load_z_table(const UINT CardNo, const double A, const double B, const double C);
RTC5_API void __stdcall n_select_cor_table(const UINT CardNo, const UINT HeadA, const UINT HeadB);
RTC5_API UINT __stdcall n_set_dsp_mode(const UINT CardNo, const UINT Mode);
RTC5_API long __stdcall n_load_stretch_table(const UINT CardNo, const char* Name, const long No);
RTC5_API void __stdcall n_number_of_correction_tables(const UINT CardNo, const UINT Number);
RTC5_API double __stdcall n_get_head_para(const UINT CardNo, const UINT HeadNo, const UINT ParaNo);
RTC5_API double __stdcall n_get_table_para(const UINT CardNo, const UINT TableNo, const UINT ParaNo);
RTC5_API UINT __stdcall load_program_file(const char* Path);
RTC5_API void __stdcall sync_slaves(void);
RTC5_API UINT __stdcall get_sync_status(void);
RTC5_API UINT __stdcall load_correction_file(const char* Name, const UINT No, const UINT Dim);
RTC5_API UINT __stdcall load_zoom_correction_file(const char* Name, const UINT No);
RTC5_API UINT __stdcall load_z_table(const double A, const double B, const double C);
RTC5_API void __stdcall select_cor_table(const UINT HeadA, const UINT HeadB);
RTC5_API UINT __stdcall set_dsp_mode(const UINT Mode);
RTC5_API long __stdcall load_stretch_table(const char* Name, const long No);
RTC5_API void __stdcall number_of_correction_tables(const UINT Number);
RTC5_API double __stdcall get_head_para(const UINT HeadNo, const UINT ParaNo);
RTC5_API double __stdcall get_table_para(const UINT TableNo, const UINT ParaNo);
RTC5_API void __stdcall n_config_list(const UINT CardNo, const UINT Mem1, const UINT Mem2);
RTC5_API void __stdcall n_get_config_list(const UINT CardNo);
RTC5_API UINT __stdcall n_save_disk(const UINT CardNo, const char* Name, const UINT Mode);
RTC5_API UINT __stdcall n_load_disk(const UINT CardNo, const char* Name, const UINT Mode);
RTC5_API UINT __stdcall n_get_list_space(const UINT CardNo);
RTC5_API void __stdcall config_list(const UINT Mem1, const UINT Mem2);
RTC5_API void __stdcall get_config_list(void);
RTC5_API UINT __stdcall save_disk(const char* Name, const UINT Mode);
RTC5_API UINT __stdcall load_disk(const char* Name, const UINT Mode);
RTC5_API UINT __stdcall get_list_space(void);
RTC5_API void __stdcall n_set_start_list_pos(const UINT CardNo, const UINT ListNo, const UINT Pos);
RTC5_API void __stdcall n_set_start_list(const UINT CardNo, const UINT ListNo);
RTC5_API void __stdcall n_set_start_list_1(const UINT CardNo);
RTC5_API void __stdcall n_set_start_list_2(const UINT CardNo);
RTC5_API void __stdcall n_set_input_pointer(const UINT CardNo, const UINT Pos);
RTC5_API UINT __stdcall n_load_list(const UINT CardNo, const UINT ListNo, const UINT Pos);
RTC5_API void __stdcall n_load_sub(const UINT CardNo, const UINT Index);
RTC5_API void __stdcall n_load_char(const UINT CardNo, const UINT Char);
RTC5_API void __stdcall n_load_text_table(const UINT CardNo, const UINT Index);
RTC5_API void __stdcall n_get_list_pointer(const UINT CardNo, UINT& ListNo, UINT& Pos);
RTC5_API UINT __stdcall n_get_input_pointer(const UINT CardNo);
RTC5_API void __stdcall set_start_list_pos(const UINT ListNo, const UINT Pos);
RTC5_API void __stdcall set_start_list(const UINT ListNo);
RTC5_API void __stdcall set_start_list_1(void);
RTC5_API void __stdcall set_start_list_2(void);
RTC5_API void __stdcall set_input_pointer(const UINT Pos);
RTC5_API UINT __stdcall load_list(const UINT ListNo, const UINT Pos);
RTC5_API void __stdcall load_sub(const UINT Index);
RTC5_API void __stdcall load_char(const UINT Char);
RTC5_API void __stdcall load_text_table(const UINT Index);
RTC5_API void __stdcall get_list_pointer(UINT& ListNo, UINT& Pos);
RTC5_API UINT __stdcall get_input_pointer(void);
RTC5_API void __stdcall n_execute_list_pos(const UINT CardNo, const UINT ListNo, const UINT Pos);
RTC5_API void __stdcall n_execute_at_pointer(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_execute_list(const UINT CardNo, const UINT ListNo);
RTC5_API void __stdcall n_execute_list_1(const UINT CardNo);
RTC5_API void __stdcall n_execute_list_2(const UINT CardNo);
RTC5_API void __stdcall n_get_out_pointer(const UINT CardNo, UINT& ListNo, UINT& Pos);
RTC5_API void __stdcall execute_list_pos(const UINT ListNo, const UINT Pos);
RTC5_API void __stdcall execute_at_pointer(const UINT Pos);
RTC5_API void __stdcall execute_list(const UINT ListNo);
RTC5_API void __stdcall execute_list_1(void);
RTC5_API void __stdcall execute_list_2(void);
RTC5_API void __stdcall get_out_pointer(UINT& ListNo, UINT& Pos);
RTC5_API void __stdcall n_auto_change_pos(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_start_loop(const UINT CardNo);
RTC5_API void __stdcall n_quit_loop(const UINT CardNo);
RTC5_API void __stdcall n_pause_list(const UINT CardNo);
RTC5_API void __stdcall n_restart_list(const UINT CardNo);
RTC5_API void __stdcall n_release_wait(const UINT CardNo);
RTC5_API void __stdcall n_stop_execution(const UINT CardNo);
RTC5_API void __stdcall n_set_pause_list_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall n_set_pause_list_not_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall n_auto_change(const UINT CardNo);
RTC5_API void __stdcall n_stop_list(const UINT CardNo);
RTC5_API UINT __stdcall n_get_wait_status(const UINT CardNo);
RTC5_API UINT __stdcall n_read_status(const UINT CardNo);
RTC5_API void __stdcall n_get_status(const UINT CardNo, UINT& Status, UINT& Pos);
RTC5_API void __stdcall auto_change_pos(const UINT Pos);
RTC5_API void __stdcall start_loop(void);
RTC5_API void __stdcall quit_loop(void);
RTC5_API void __stdcall pause_list(void);
RTC5_API void __stdcall restart_list(void);
RTC5_API void __stdcall release_wait(void);
RTC5_API void __stdcall stop_execution(void);
RTC5_API void __stdcall set_pause_list_cond(const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall set_pause_list_not_cond(const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall auto_change(void);
RTC5_API void __stdcall stop_list(void);
RTC5_API UINT __stdcall get_wait_status(void);
RTC5_API UINT __stdcall read_status(void);
RTC5_API void __stdcall get_status(UINT& Status, UINT& Pos);
RTC5_API void __stdcall n_set_extstartpos(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_set_max_counts(const UINT CardNo, const UINT Counts);
RTC5_API void __stdcall n_set_control_mode(const UINT CardNo, const UINT Mode);
RTC5_API void __stdcall n_simulate_ext_stop(const UINT CardNo);
RTC5_API void __stdcall n_simulate_ext_start_ctrl(const UINT CardNo);
RTC5_API UINT __stdcall n_get_counts(const UINT CardNo);
RTC5_API UINT __stdcall n_get_startstop_info(const UINT CardNo);
RTC5_API void __stdcall set_extstartpos(const UINT Pos);
RTC5_API void __stdcall set_max_counts(const UINT Counts);
RTC5_API void __stdcall set_control_mode(const UINT Mode);
RTC5_API void __stdcall simulate_ext_stop(void);
RTC5_API void __stdcall simulate_ext_start_ctrl(void);
RTC5_API UINT __stdcall get_counts(void);
RTC5_API UINT __stdcall get_startstop_info(void);
RTC5_API void __stdcall n_copy_dst_src(const UINT CardNo, const UINT Dst, const UINT Src, const UINT Mode);
RTC5_API void __stdcall n_set_char_pointer(const UINT CardNo, const UINT Char, const UINT Pos);
RTC5_API void __stdcall n_set_sub_pointer(const UINT CardNo, const UINT Index, const UINT Pos);
RTC5_API void __stdcall n_set_text_table_pointer(const UINT CardNo, const UINT Index, const UINT Pos);
RTC5_API void __stdcall n_set_char_table(const UINT CardNo, const UINT Index, const UINT Pos);
RTC5_API UINT __stdcall n_get_char_pointer(const UINT CardNo, const UINT Char);
RTC5_API UINT __stdcall n_get_sub_pointer(const UINT CardNo, const UINT Index);
RTC5_API UINT __stdcall n_get_text_table_pointer(const UINT CardNo, const UINT Index);
RTC5_API void __stdcall copy_dst_src(const UINT Dst, const UINT Src, const UINT Mode);
RTC5_API void __stdcall set_char_pointer(const UINT Char, const UINT Pos);
RTC5_API void __stdcall set_sub_pointer(const UINT Index, const UINT Pos);
RTC5_API void __stdcall set_text_table_pointer(const UINT Index, const UINT Pos);
RTC5_API void __stdcall set_char_table(const UINT Index, const UINT Pos);
RTC5_API UINT __stdcall get_char_pointer(const UINT Char);
RTC5_API UINT __stdcall get_sub_pointer(const UINT Index);
RTC5_API UINT __stdcall get_text_table_pointer(const UINT Index);
RTC5_API void __stdcall n_time_update(const UINT CardNo);
RTC5_API void __stdcall n_set_serial_step(const UINT CardNo, const UINT No, const UINT Step);
RTC5_API void __stdcall n_select_serial_set(const UINT CardNo, const UINT No);
RTC5_API void __stdcall n_set_serial(const UINT CardNo, const UINT No);
RTC5_API double __stdcall n_get_serial(const UINT CardNo);
RTC5_API double __stdcall n_get_list_serial(const UINT CardNo, UINT& SetNo);
RTC5_API void __stdcall time_update(void);
RTC5_API void __stdcall set_serial_step(const UINT No, const UINT Step);
RTC5_API void __stdcall select_serial_set(const UINT No);
RTC5_API void __stdcall set_serial(const UINT No);
RTC5_API double __stdcall get_serial(void);
RTC5_API double __stdcall get_list_serial(UINT& SetNo);
RTC5_API void __stdcall n_write_io_port_mask(const UINT CardNo, const UINT Value, const UINT Mask);
RTC5_API void __stdcall n_write_8bit_port(const UINT CardNo, const UINT Value);
RTC5_API UINT __stdcall n_read_io_port(const UINT CardNo);
RTC5_API UINT __stdcall n_read_io_port_buffer(const UINT CardNo, const UINT Index, UINT& Value, long& XPos, long& YPos, UINT& Time);
RTC5_API UINT __stdcall n_get_io_status(const UINT CardNo);
RTC5_API UINT __stdcall n_read_analog_in(const UINT CardNo);
RTC5_API void __stdcall n_write_da_x(const UINT CardNo, const UINT x, const UINT Value);
RTC5_API void __stdcall n_set_laser_off_default(const UINT CardNo, const UINT AnalogOut1, const UINT AnalogOut2, const UINT DigitalOut);
RTC5_API void __stdcall n_set_port_default(const UINT CardNo, const UINT Port, const UINT Value);
RTC5_API void __stdcall n_write_io_port(const UINT CardNo, const UINT Value);
RTC5_API void __stdcall n_write_da_1(const UINT CardNo, const UINT Value);
RTC5_API void __stdcall n_write_da_2(const UINT CardNo, const UINT Value);
RTC5_API void __stdcall write_io_port_mask(const UINT Value, const UINT Mask);
RTC5_API void __stdcall write_8bit_port(const UINT Value);
RTC5_API UINT __stdcall read_io_port(void);
RTC5_API UINT __stdcall read_io_port_buffer(const UINT Index, UINT& Value, long& XPos, long& YPos, UINT& Time);
RTC5_API UINT __stdcall get_io_status(void);
RTC5_API UINT __stdcall read_analog_in(void);
RTC5_API void __stdcall write_da_x(const UINT x, const UINT Value);
RTC5_API void __stdcall set_laser_off_default(const UINT AnalogOut1, const UINT AnalogOut2, const UINT DigitalOut);
RTC5_API void __stdcall set_port_default(const UINT Port, const UINT Value);
RTC5_API void __stdcall write_io_port(const UINT Value);
RTC5_API void __stdcall write_da_1(const UINT Value);
RTC5_API void __stdcall write_da_2(const UINT Value);
RTC5_API void __stdcall n_disable_laser(const UINT CardNo);
RTC5_API void __stdcall n_enable_laser(const UINT CardNo);
RTC5_API void __stdcall n_laser_signal_on(const UINT CardNo);
RTC5_API void __stdcall n_laser_signal_off(const UINT CardNo);
RTC5_API void __stdcall n_set_standby(const UINT CardNo, const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall n_set_laser_pulses_ctrl(const UINT CardNo, const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall n_set_firstpulse_killer(const UINT CardNo, const UINT Length);
RTC5_API void __stdcall n_set_qswitch_delay(const UINT CardNo, const UINT Delay);
RTC5_API void __stdcall n_set_laser_mode(const UINT CardNo, const UINT Mode);
RTC5_API void __stdcall n_set_laser_control(const UINT CardNo, const UINT Ctrl);
RTC5_API void __stdcall n_set_laser_pin_out(const UINT CardNo, const UINT Pins);
RTC5_API UINT __stdcall n_get_laser_pin_in(const UINT CardNo);
RTC5_API void __stdcall n_set_softstart_level(const UINT CardNo, const UINT Index, const UINT Level);
RTC5_API void __stdcall n_set_softstart_mode(const UINT CardNo, const UINT Mode, const UINT Number, const UINT Delay);
RTC5_API UINT __stdcall n_set_auto_laser_control(const UINT CardNo, const UINT Ctrl, const UINT Value, const UINT Mode, const UINT MinValue, const UINT MaxValue);
RTC5_API UINT __stdcall n_set_auto_laser_params(const UINT CardNo, const UINT Ctrl, const UINT Value, const UINT MinValue, const UINT MaxValue);
RTC5_API long __stdcall n_load_auto_laser_control(const UINT CardNo, const char* Name, const UINT No);
RTC5_API long __stdcall n_load_position_control(const UINT CardNo, const char* Name, const UINT No);
RTC5_API void __stdcall n_set_default_pixel(const UINT CardNo, const UINT PulseLength);
RTC5_API void __stdcall n_get_standby(const UINT CardNo, UINT& HalfPeriod, UINT& PulseLength);
RTC5_API void __stdcall n_set_pulse_picking(const UINT CardNo, const UINT No);
RTC5_API void __stdcall n_set_pulse_picking_length(const UINT CardNo, const UINT Length);
RTC5_API void __stdcall n_config_laser_signals(const UINT CardNo, const UINT Config);
RTC5_API void __stdcall disable_laser(void);
RTC5_API void __stdcall enable_laser(void);
RTC5_API void __stdcall laser_signal_on(void);
RTC5_API void __stdcall laser_signal_off(void);
RTC5_API void __stdcall set_standby(const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall set_laser_pulses_ctrl(const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall set_firstpulse_killer(const UINT Length);
RTC5_API void __stdcall set_qswitch_delay(const UINT Delay);
RTC5_API void __stdcall set_laser_mode(const UINT Mode);
RTC5_API void __stdcall set_laser_control(const UINT Ctrl);
RTC5_API void __stdcall set_laser_pin_out(const UINT Pins);
RTC5_API UINT __stdcall get_laser_pin_in(void);
RTC5_API void __stdcall set_softstart_level(const UINT Index, const UINT Level);
RTC5_API void __stdcall set_softstart_mode(const UINT Mode, const UINT Number, const UINT Delay);
RTC5_API UINT __stdcall set_auto_laser_control(const UINT Ctrl, const UINT Value, const UINT Mode, const UINT MinValue, const UINT MaxValue);
RTC5_API UINT __stdcall set_auto_laser_params(const UINT Ctrl, const UINT Value, const UINT MinValue, const UINT MaxValue);
RTC5_API long __stdcall load_auto_laser_control(const char* Name, const UINT No);
RTC5_API long __stdcall load_position_control(const char* Name, const UINT No);
RTC5_API void __stdcall set_default_pixel(const UINT PulseLength);
RTC5_API void __stdcall get_standby(UINT& HalfPeriod, UINT& PulseLength);
RTC5_API void __stdcall set_pulse_picking(const UINT No);
RTC5_API void __stdcall set_pulse_picking_length(const UINT Length);
RTC5_API void __stdcall config_laser_signals(const UINT Config);
RTC5_API void __stdcall n_set_ext_start_delay(const UINT CardNo, const long Delay, const UINT EncoderNo);
RTC5_API void __stdcall n_set_rot_center(const UINT CardNo, const long X, const long Y);
RTC5_API void __stdcall n_simulate_encoder(const UINT CardNo, const UINT EncoderNo);
RTC5_API UINT __stdcall n_get_marking_info(const UINT CardNo);
RTC5_API void __stdcall n_set_encoder_speed_ctrl(const UINT CardNo, const UINT EncoderNo, const double Speed, const double Smooth);
RTC5_API void __stdcall n_set_mcbsp_x(const UINT CardNo, const double ScaleX);
RTC5_API void __stdcall n_set_mcbsp_y(const UINT CardNo, const double ScaleY);
RTC5_API void __stdcall n_set_mcbsp_rot(const UINT CardNo, const double Resolution);
RTC5_API void __stdcall n_set_mcbsp_matrix(const UINT CardNo);
RTC5_API void __stdcall n_set_mcbsp_in(const UINT CardNo, const UINT Mode, const double Scale);
RTC5_API void __stdcall n_set_multi_mcbsp_in(const UINT CardNo, const UINT Ctrl, const UINT P, const UINT Mode);
RTC5_API void __stdcall n_set_fly_tracking_error(const UINT CardNo, const UINT TrackingErrorX, const UINT TrackingErrorY);
RTC5_API long __stdcall n_load_fly_2d_table(const UINT CardNo, const char* Name, const UINT No);
RTC5_API void __stdcall n_init_fly_2d(const UINT CardNo, const long OffsetX, const long OffsetY);
RTC5_API void __stdcall n_get_fly_2d_offset(const UINT CardNo, long& OffsetX, long& OffsetY);
RTC5_API void __stdcall n_get_encoder(const UINT CardNo, long& Encoder0, long& Encoder1);
RTC5_API void __stdcall n_read_encoder(const UINT CardNo, long& Encoder0_1, long& Encoder1_1, long& Encoder0_2, long& Encoder1_2);
RTC5_API long __stdcall n_get_mcbsp(const UINT CardNo);
RTC5_API long __stdcall n_read_mcbsp(const UINT CardNo, const UINT No);
RTC5_API long __stdcall n_read_multi_mcbsp(const UINT CardNo, const UINT No);
RTC5_API void __stdcall set_ext_start_delay(const long Delay, const UINT EncoderNo);
RTC5_API void __stdcall set_rot_center(const long X, const long Y);
RTC5_API void __stdcall simulate_encoder(const UINT EncoderNo);
RTC5_API UINT __stdcall get_marking_info(void);
RTC5_API void __stdcall set_encoder_speed_ctrl(const UINT EncoderNo, const double Speed, const double Smooth);
RTC5_API void __stdcall set_mcbsp_x(const double ScaleX);
RTC5_API void __stdcall set_mcbsp_y(const double ScaleY);
RTC5_API void __stdcall set_mcbsp_rot(const double Resolution);
RTC5_API void __stdcall set_mcbsp_matrix(void);
RTC5_API void __stdcall set_mcbsp_in(const UINT Mode, const double Scale);
RTC5_API void __stdcall set_multi_mcbsp_in(const UINT Ctrl, const UINT P, const UINT Mode);
RTC5_API void __stdcall set_fly_tracking_error(const UINT TrackingErrorX, const UINT TrackingErrorY);
RTC5_API long __stdcall load_fly_2d_table(const char* Name, const UINT No);
RTC5_API void __stdcall init_fly_2d(const long OffsetX, const long OffsetY);
RTC5_API void __stdcall get_fly_2d_offset(long& OffsetX, long& OffsetY);
RTC5_API void __stdcall get_encoder(long& Encoder0, long& Encoder1);
RTC5_API void __stdcall read_encoder(long& Encoder0_1, long& Encoder1_1, long& Encoder0_2, long& Encoder1_2);
RTC5_API long __stdcall get_mcbsp(void);
RTC5_API long __stdcall read_mcbsp(const UINT No);
RTC5_API long __stdcall read_multi_mcbsp(const UINT No);
RTC5_API double __stdcall n_get_time(const UINT CardNo);
RTC5_API double __stdcall n_get_lap_time(const UINT CardNo);
RTC5_API void __stdcall n_measurement_status(const UINT CardNo, UINT& Busy, UINT& Pos);
RTC5_API void __stdcall n_get_waveform(const UINT CardNo, const UINT Channel, const UINT Number, const ULONG_PTR Ptr);
RTC5_API void __stdcall n_bounce_supp(const UINT CardNo, const UINT Length);
RTC5_API void __stdcall n_home_position_xyz(const UINT CardNo, const long XHome, const long YHome, const long ZHome);
RTC5_API void __stdcall n_home_position(const UINT CardNo, const long XHome, const long YHome);
RTC5_API void __stdcall n_rs232_config(const UINT CardNo, const UINT BaudRate);
RTC5_API void __stdcall n_rs232_write_data(const UINT CardNo, const UINT Data);
RTC5_API void __stdcall n_rs232_write_text(const UINT CardNo, const char* pData);
RTC5_API UINT __stdcall n_rs232_read_data(const UINT CardNo);
RTC5_API UINT __stdcall n_set_mcbsp_freq(const UINT CardNo, const UINT Freq);
RTC5_API void __stdcall n_mcbsp_init(const UINT CardNo, const UINT XDelay, const UINT RDelay);
RTC5_API void __stdcall n_mcbsp_init_spi(const UINT CardNo, const UINT ClockLevel, const UINT ClockDelay);
RTC5_API UINT __stdcall n_get_overrun(const UINT CardNo);
RTC5_API UINT __stdcall n_get_master_slave(const UINT CardNo);
RTC5_API void __stdcall n_get_transform(const UINT CardNo, const UINT Number, const ULONG_PTR Ptr1, const ULONG_PTR Ptr2, const ULONG_PTR Ptr, const UINT Code);
RTC5_API void __stdcall n_stop_trigger(const UINT CardNo);
RTC5_API void __stdcall n_move_to(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_set_enduring_wobbel(const UINT CardNo, const UINT CenterX, const UINT CenterY, const UINT CenterZ, const UINT LimitHi, const UINT LimitLo, const double ScaleX, const double ScaleY, const double ScaleZ);
RTC5_API void __stdcall n_set_enduring_wobbel_2(const UINT CardNo, const UINT CenterX, const UINT CenterY, const UINT CenterZ, const UINT LimitHi, const UINT LimitLo, const double ScaleX, const double ScaleY, const double ScaleZ);
RTC5_API void __stdcall n_set_free_variable(const UINT CardNo, const UINT VarNo, const UINT Value);
RTC5_API UINT __stdcall n_get_free_variable(const UINT CardNo, const UINT VarNo);
RTC5_API void __stdcall n_set_mcbsp_out_ptr(const UINT CardNo, const UINT Number, const ULONG_PTR SignalPtr);
RTC5_API void __stdcall n_periodic_toggle(const UINT CardNo, const UINT Port, const UINT Mask, const UINT P1, const UINT P2, const UINT Count, const UINT Start);
RTC5_API UINT __stdcall n_load_wobbel_power(const UINT CardNo, const UINT TableNo, const ULONG_PTR Ptr, const long Flag);
RTC5_API double __stdcall get_time(void);
RTC5_API double __stdcall get_lap_time(void);
RTC5_API void __stdcall measurement_status(UINT& Busy, UINT& Pos);
RTC5_API void __stdcall get_waveform(const UINT Channel, const UINT Number, const ULONG_PTR Ptr);
RTC5_API void __stdcall bounce_supp(const UINT Length);
RTC5_API void __stdcall home_position_xyz(const long XHome, const long YHome, const long ZHome);
RTC5_API void __stdcall home_position(const long XHome, const long YHome);
RTC5_API void __stdcall rs232_config(const UINT BaudRate);
RTC5_API void __stdcall rs232_write_data(const UINT Data);
RTC5_API void __stdcall rs232_write_text(const char* pData);
RTC5_API UINT __stdcall rs232_read_data(void);
RTC5_API UINT __stdcall set_mcbsp_freq(const UINT Freq);
RTC5_API void __stdcall mcbsp_init(const UINT XDelay, const UINT RDelay);
RTC5_API void __stdcall mcbsp_init_spi(const UINT ClockLevel, const UINT ClockDelay);
RTC5_API UINT __stdcall get_overrun(void);
RTC5_API UINT __stdcall get_master_slave(void);
RTC5_API void __stdcall get_transform(const UINT Number, const ULONG_PTR Ptr1, const ULONG_PTR Ptr2, const ULONG_PTR Ptr, const UINT Code);
RTC5_API void __stdcall stop_trigger(void);
RTC5_API void __stdcall move_to(const UINT Pos);
RTC5_API void __stdcall set_enduring_wobbel(const UINT CenterX, const UINT CenterY, const UINT CenterZ, const UINT LimitHi, const UINT LimitLo, const double ScaleX, const double ScaleY, const double ScaleZ);
RTC5_API void __stdcall set_enduring_wobbel_2(const UINT CenterX, const UINT CenterY, const UINT CenterZ, const UINT LimitHi, const UINT LimitLo, const double ScaleX, const double ScaleY, const double ScaleZ);
RTC5_API void __stdcall set_free_variable(const UINT VarNo, const UINT Value);
RTC5_API UINT __stdcall get_free_variable(const UINT VarNo);
RTC5_API void __stdcall set_mcbsp_out_ptr(const UINT Number, const ULONG_PTR SignalPtr);
RTC5_API void __stdcall periodic_toggle(const UINT Port, const UINT Mask, const UINT P1, const UINT P2, const UINT Count, const UINT Start);
RTC5_API UINT __stdcall load_wobbel_power(const UINT TableNo, const ULONG_PTR Ptr, const long Flag);
RTC5_API void __stdcall n_set_defocus(const UINT CardNo, const long Shift);
RTC5_API void __stdcall n_set_defocus_offset(const UINT CardNo, const long Shift);
RTC5_API void __stdcall n_goto_xyz(const UINT CardNo, const long X, const long Y, const long Z);
RTC5_API void __stdcall n_set_zoom(const UINT CardNo, const UINT Zoom);
RTC5_API void __stdcall n_goto_xy(const UINT CardNo, const long X, const long Y);
RTC5_API long __stdcall n_get_z_distance(const UINT CardNo, const long X, const long Y, const long Z);
RTC5_API void __stdcall set_defocus(const long Shift);
RTC5_API void __stdcall set_defocus_offset(const long Shift);
RTC5_API void __stdcall goto_xyz(const long X, const long Y, const long Z);
RTC5_API void __stdcall goto_xy(const long X, const long Y);
RTC5_API void __stdcall set_zoom(const UINT Zoom);
RTC5_API long __stdcall get_z_distance(const long X, const long Y, const long Z);
RTC5_API void __stdcall n_set_offset_xyz(const UINT CardNo, const UINT HeadNo, const long XOffset, const long YOffset, const long ZOffset, const UINT at_once);
RTC5_API void __stdcall n_set_offset(const UINT CardNo, const UINT HeadNo, const long XOffset, const long YOffset, const UINT at_once);
RTC5_API void __stdcall n_set_matrix(const UINT CardNo, const UINT HeadNo, const double M11, const double M12, const double M21, const double M22, const UINT at_once);
RTC5_API void __stdcall n_set_angle(const UINT CardNo, const UINT HeadNo, const double Angle, const UINT at_once);
RTC5_API void __stdcall n_set_scale(const UINT CardNo, const UINT HeadNo, const double Scale, const UINT at_once);
RTC5_API void __stdcall n_apply_mcbsp(const UINT CardNo, const UINT HeadNo, const UINT at_once);
RTC5_API UINT __stdcall n_upload_transform(const UINT CardNo, const UINT HeadNo, const ULONG_PTR Ptr);
RTC5_API void __stdcall set_offset_xyz(const UINT HeadNo, const long XOffset, const long YOffset, const long ZOffset, const UINT at_once);
RTC5_API void __stdcall set_offset(const UINT HeadNo, const long XOffset, const long YOffset, const UINT at_once);
RTC5_API void __stdcall set_matrix(const UINT HeadNo, const double M11, const double M12, const double M21, const double M22, const UINT at_once);
RTC5_API void __stdcall set_angle(const UINT HeadNo, const double Angle, const UINT at_once);
RTC5_API void __stdcall set_scale(const UINT HeadNo, const double Scale, const UINT at_once);
RTC5_API void __stdcall apply_mcbsp(const UINT HeadNo, const UINT at_once);
RTC5_API UINT __stdcall upload_transform(const UINT HeadNo, const ULONG_PTR Ptr);
RTC5_API UINT __stdcall transform(long& Sig1, long& Sig2, const ULONG_PTR Ptr, const UINT Code);
RTC5_API void __stdcall n_set_delay_mode(const UINT CardNo, const UINT VarPoly, const UINT DirectMove3D, const UINT EdgeLevel, const UINT MinJumpDelay, const UINT JumpLengthLimit);
RTC5_API void __stdcall n_set_jump_speed_ctrl(const UINT CardNo, const double Speed);
RTC5_API void __stdcall n_set_mark_speed_ctrl(const UINT CardNo, const double Speed);
RTC5_API void __stdcall n_set_sky_writing_para(const UINT CardNo, const double Timelag, const long LaserOnShift, const UINT Nprev, const UINT Npost);
RTC5_API void __stdcall n_set_sky_writing_limit(const UINT CardNo, const double CosAngle);
RTC5_API void __stdcall n_set_sky_writing_mode(const UINT CardNo, const UINT Mode);
RTC5_API long __stdcall n_load_varpolydelay(const UINT CardNo, const char* Name, const UINT No);
RTC5_API void __stdcall n_set_hi(const UINT CardNo, const UINT HeadNo, const double GalvoGainX, const double GalvoGainY, const long GalvoOffsetX, const long GalvoOffsetY);
RTC5_API void __stdcall n_get_hi_pos(const UINT CardNo, const UINT HeadNo, long& X1, long& X2, long& Y1, long& Y2);
RTC5_API UINT __stdcall n_auto_cal(const UINT CardNo, const UINT HeadNo, const UINT Command);
RTC5_API UINT __stdcall n_get_auto_cal(const UINT CardNo, const UINT HeadNo);
RTC5_API UINT __stdcall n_write_hi_pos(const UINT CardNo, const UINT HeadNo, const long X1, const long X2, const long Y1, const long Y2);
RTC5_API void __stdcall n_set_sky_writing(const UINT CardNo, const double Timelag, const long LaserOnShift);
RTC5_API void __stdcall n_get_hi_data(const UINT CardNo, long& X1, long& X2, long& Y1, long& Y2);
RTC5_API void __stdcall set_delay_mode(const UINT VarPoly, const UINT DirectMove3D, const UINT EdgeLevel, const UINT MinJumpDelay, const UINT JumpLengthLimit);
RTC5_API void __stdcall set_jump_speed_ctrl(const double Speed);
RTC5_API void __stdcall set_mark_speed_ctrl(const double Speed);
RTC5_API void __stdcall set_sky_writing_para(const double Timelag, const long LaserOnShift, const UINT Nprev, const UINT Npost);
RTC5_API void __stdcall set_sky_writing_limit(const double CosAngle);
RTC5_API void __stdcall set_sky_writing_mode(const UINT Mode);
RTC5_API long __stdcall load_varpolydelay(const char* Name, const UINT No);
RTC5_API void __stdcall set_hi(const UINT HeadNo, const double GalvoGainX, const double GalvoGainY, const long GalvoOffsetX, const long GalvoOffsetY);
RTC5_API void __stdcall get_hi_pos(const UINT HeadNo, long& X1, long& X2, long& Y1, long& Y2);
RTC5_API UINT __stdcall auto_cal(const UINT HeadNo, const UINT Command);
RTC5_API UINT __stdcall get_auto_cal(const UINT HeadNo);
RTC5_API UINT __stdcall write_hi_pos(const UINT HeadNo, const long X1, const long X2, const long Y1, const long Y2);
RTC5_API void __stdcall set_sky_writing(const double Timelag, const long LaserOnShift);
RTC5_API void __stdcall get_hi_data(long& X1, long& X2, long& Y1, long& Y2);
RTC5_API void __stdcall n_send_user_data(const UINT CardNo, const UINT Head, const UINT Axis, const long Data0, const long Data1, const long Data2, const long Data3, const long Data4);
RTC5_API long __stdcall n_read_user_data(const UINT CardNo, const UINT Head, const UINT Axis, long& Data0, long& Data1, long& Data2, long& Data3, long& Data4);
RTC5_API void __stdcall n_control_command(const UINT CardNo, const UINT Head, const UINT Axis, const UINT Data);
RTC5_API long __stdcall n_get_value(const UINT CardNo, const UINT Signal);
RTC5_API void __stdcall n_get_values(const UINT CardNo, const ULONG_PTR SignalPtr, const ULONG_PTR ResultPtr);
RTC5_API void __stdcall n_get_galvo_controls(const UINT CardNo, const ULONG_PTR SignalPtr, const ULONG_PTR ResultPtr);
RTC5_API UINT __stdcall n_get_head_status(const UINT CardNo, const UINT Head);
RTC5_API long __stdcall n_set_jump_mode(const UINT CardNo, const long Flag, const UINT Length, const long VA1, const long VA2, const long VB1, const long VB2, const long JA1, const long JA2, const long JB1, const long JB2);
RTC5_API long __stdcall n_load_jump_table_offset(const UINT CardNo, const char* Name, const UINT No, const UINT PosAck, const long Offset, const UINT MinDelay, const UINT MaxDelay, const UINT ListPos);
RTC5_API UINT __stdcall n_get_jump_table(const UINT CardNo, const ULONG_PTR Ptr);
RTC5_API UINT __stdcall n_set_jump_table(const UINT CardNo, const ULONG_PTR Ptr);
RTC5_API long __stdcall n_load_jump_table(const UINT CardNo, const char* Name, const UINT No, const UINT PosAck, const UINT MinDelay, const UINT MaxDelay, const UINT ListPos);
RTC5_API void __stdcall send_user_data(const UINT Head, const UINT Axis, const long Data0, const long Data1, const long Data2, const long Data3, const long Data4);
RTC5_API long __stdcall read_user_data(const UINT Head, const UINT Axis, long& Data0, long& Data1, long& Data2, long& Data3, long& Data4);
RTC5_API void __stdcall control_command(const UINT Head, const UINT Axis, const UINT Data);
RTC5_API long __stdcall get_value(const UINT Signal);
RTC5_API void __stdcall get_values(const ULONG_PTR SignalPtr, const ULONG_PTR ResultPtr);
RTC5_API void __stdcall get_galvo_controls(const ULONG_PTR SignalPtr, const ULONG_PTR ResultPtr);
RTC5_API UINT __stdcall get_head_status(const UINT Head);
RTC5_API long __stdcall set_jump_mode(const long Flag, const UINT Length, const long VA1, const long VA2, const long VB1, const long VB2, const long JA1, const long JA2, const long JB1, const long JB2);
RTC5_API long __stdcall load_jump_table_offset(const char* Name, const UINT No, const UINT PosAck, const long Offset, const UINT MinDelay, const UINT MaxDelay, const UINT ListPos);
RTC5_API UINT __stdcall get_jump_table(const ULONG_PTR Ptr);
RTC5_API UINT __stdcall set_jump_table(const ULONG_PTR Ptr);
RTC5_API long __stdcall load_jump_table(const char* Name, const UINT No, const UINT PosAck, const UINT MinDelay, const UINT MaxDelay, const UINT ListPos);
RTC5_API void __stdcall n_stepper_init(const UINT CardNo, const UINT No, const UINT Period, const long Dir, const long Pos, const UINT Tol, const UINT Enable, const UINT WaitTime);
RTC5_API void __stdcall n_stepper_enable(const UINT CardNo, const long Enable1, const long Enable2);
RTC5_API void __stdcall n_stepper_disable_switch(const UINT CardNo, const long Disable1, const long Disable2);
RTC5_API void __stdcall n_stepper_control(const UINT CardNo, const long Period1, const long Period2);
RTC5_API void __stdcall n_stepper_abs_no(const UINT CardNo, const UINT No, const long Pos, const UINT WaitTime);
RTC5_API void __stdcall n_stepper_rel_no(const UINT CardNo, const UINT No, const long dPos, const UINT WaitTime);
RTC5_API void __stdcall n_stepper_abs(const UINT CardNo, const long Pos1, const long Pos2, const UINT WaitTime);
RTC5_API void __stdcall n_stepper_rel(const UINT CardNo, const long dPos1, const long dPos2, const UINT WaitTime);
RTC5_API void __stdcall n_get_stepper_status(const UINT CardNo, UINT& Status1, long& Pos1, UINT& Status2, long& Pos2);
RTC5_API void __stdcall stepper_init(const UINT No, const UINT Period, const long Dir, const long Pos, const UINT Tol, const UINT Enable, const UINT WaitTime);
RTC5_API void __stdcall stepper_enable(const long Enable1, const long Enable2);
RTC5_API void __stdcall stepper_disable_switch(const long Disable1, const long Disable2);
RTC5_API void __stdcall stepper_control(const long Period1, const long Period2);
RTC5_API void __stdcall stepper_abs_no(const UINT No, const long Pos, const UINT WaitTime);
RTC5_API void __stdcall stepper_rel_no(const UINT No, const long dPos, const UINT WaitTime);
RTC5_API void __stdcall stepper_abs(const long Pos1, const long Pos2, const UINT WaitTime);
RTC5_API void __stdcall stepper_rel(const long dPos1, const long dPos2, const UINT WaitTime);
RTC5_API void __stdcall get_stepper_status(UINT& Status1, long& Pos1, UINT& Status2, long& Pos2);
RTC5_API void __stdcall n_select_cor_table_list(const UINT CardNo, const UINT HeadA, const UINT HeadB);
RTC5_API void __stdcall select_cor_table_list(const UINT HeadA, const UINT HeadB);
RTC5_API void __stdcall n_list_nop(const UINT CardNo);
RTC5_API void __stdcall n_list_continue(const UINT CardNo);
RTC5_API void __stdcall n_list_next(const UINT CardNo);
RTC5_API void __stdcall n_long_delay(const UINT CardNo, const UINT Delay);
RTC5_API void __stdcall n_set_end_of_list(const UINT CardNo);
RTC5_API void __stdcall n_set_wait(const UINT CardNo, const UINT WaitWord);
RTC5_API void __stdcall n_list_jump_pos(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_list_jump_rel(const UINT CardNo, const long Pos);
RTC5_API void __stdcall n_list_repeat(const UINT CardNo);
RTC5_API void __stdcall n_list_until(const UINT CardNo, const UINT Number);
RTC5_API void __stdcall n_range_checking(const UINT CardNo, const UINT HeadNo, const UINT Mode, const UINT Data);
RTC5_API void __stdcall n_set_list_jump(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall list_nop(void);
RTC5_API void __stdcall list_continue(void);
RTC5_API void __stdcall list_next(void);
RTC5_API void __stdcall long_delay(const UINT Delay);
RTC5_API void __stdcall set_end_of_list(void);
RTC5_API void __stdcall set_wait(const UINT WaitWord);
RTC5_API void __stdcall list_jump_pos(const UINT Pos);
RTC5_API void __stdcall list_jump_rel(const long Pos);
RTC5_API void __stdcall list_repeat(void);
RTC5_API void __stdcall list_until(const UINT Number);
RTC5_API void __stdcall range_checking(const UINT HeadNo, const UINT Mode, const UINT Data);
RTC5_API void __stdcall set_list_jump(const UINT Pos);
RTC5_API void __stdcall n_set_extstartpos_list(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_set_control_mode_list(const UINT CardNo, const UINT Mode);
RTC5_API void __stdcall n_simulate_ext_start(const UINT CardNo, const long Delay, const UINT EncoderNo);
RTC5_API void __stdcall set_extstartpos_list(const UINT Pos);
RTC5_API void __stdcall set_control_mode_list(const UINT Mode);
RTC5_API void __stdcall simulate_ext_start(const long Delay, const UINT EncoderNo);
RTC5_API void __stdcall n_list_return(const UINT CardNo);
RTC5_API void __stdcall n_list_call_repeat(const UINT CardNo, const UINT Pos, const UINT Number);
RTC5_API void __stdcall n_list_call_abs_repeat(const UINT CardNo, const UINT Pos, const UINT Number);
RTC5_API void __stdcall n_list_call(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_list_call_abs(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_sub_call_repeat(const UINT CardNo, const UINT Index, const UINT Number);
RTC5_API void __stdcall n_sub_call_abs_repeat(const UINT CardNo, const UINT Index, const UINT Number);
RTC5_API void __stdcall n_sub_call(const UINT CardNo, const UINT Index);
RTC5_API void __stdcall n_sub_call_abs(const UINT CardNo, const UINT Index);
RTC5_API void __stdcall list_return(void);
RTC5_API void __stdcall list_call_repeat(const UINT Pos, const UINT Number);
RTC5_API void __stdcall list_call_abs_repeat(const UINT Pos, const UINT Number);
RTC5_API void __stdcall list_call(const UINT Pos);
RTC5_API void __stdcall list_call_abs(const UINT Pos);
RTC5_API void __stdcall sub_call_repeat(const UINT Index, const UINT Number);
RTC5_API void __stdcall sub_call_abs_repeat(const UINT Index, const UINT Number);
RTC5_API void __stdcall sub_call(const UINT Index);
RTC5_API void __stdcall sub_call_abs(const UINT Index);
RTC5_API void __stdcall n_list_call_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall n_list_call_abs_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall n_sub_call_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall n_sub_call_abs_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall n_list_jump_pos_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Index);
RTC5_API void __stdcall n_list_jump_rel_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0, const long Index);
RTC5_API void __stdcall n_if_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall n_if_not_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall n_if_pin_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall n_if_not_pin_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall n_switch_ioport(const UINT CardNo, const UINT MaskBits, const UINT ShiftBits);
RTC5_API void __stdcall n_list_jump_cond(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall list_call_cond(const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall list_call_abs_cond(const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall sub_call_cond(const UINT Mask1, const UINT Mask0, const UINT Index);
RTC5_API void __stdcall sub_call_abs_cond(const UINT Mask1, const UINT Mask0, const UINT Index);
RTC5_API void __stdcall list_jump_pos_cond(const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall list_jump_rel_cond(const UINT Mask1, const UINT Mask0, const long Pos);
RTC5_API void __stdcall if_cond(const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall if_not_cond(const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall if_pin_cond(const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall if_not_pin_cond(const UINT Mask1, const UINT Mask0);
RTC5_API void __stdcall switch_ioport(const UINT MaskBits, const UINT ShiftBits);
RTC5_API void __stdcall list_jump_cond(const UINT Mask1, const UINT Mask0, const UINT Pos);
RTC5_API void __stdcall n_select_char_set(const UINT CardNo, const UINT No);
RTC5_API void __stdcall n_mark_text(const UINT CardNo, const char* Text);
RTC5_API void __stdcall n_mark_text_abs(const UINT CardNo, const char* Text);
RTC5_API void __stdcall n_mark_char(const UINT CardNo, const UINT Char);
RTC5_API void __stdcall n_mark_char_abs(const UINT CardNo, const UINT Char);
RTC5_API void __stdcall select_char_set(const UINT No);
RTC5_API void __stdcall mark_text(const char* Text);
RTC5_API void __stdcall mark_text_abs(const char* Text);
RTC5_API void __stdcall mark_char(const UINT Char);
RTC5_API void __stdcall mark_char_abs(const UINT Char);
RTC5_API void __stdcall n_mark_serial(const UINT CardNo, const UINT Mode, const UINT Digits);
RTC5_API void __stdcall n_mark_serial_abs(const UINT CardNo, const UINT Mode, const UINT Digits);
RTC5_API void __stdcall n_mark_date(const UINT CardNo, const UINT Part, const UINT Mode);
RTC5_API void __stdcall n_mark_date_abs(const UINT CardNo, const UINT Part, const UINT Mode);
RTC5_API void __stdcall n_mark_time(const UINT CardNo, const UINT Part, const UINT Mode);
RTC5_API void __stdcall n_mark_time_abs(const UINT CardNo, const UINT Part, const UINT Mode);
RTC5_API void __stdcall n_select_serial_set_list(const UINT CardNo, const UINT No);
RTC5_API void __stdcall n_set_serial_step_list(const UINT CardNo, const UINT No, const UINT Step);
RTC5_API void __stdcall n_time_fix_f_off(const UINT CardNo, const UINT FirstDay, const UINT Offset);
RTC5_API void __stdcall n_time_fix_f(const UINT CardNo, const UINT FirstDay);
RTC5_API void __stdcall n_time_fix(const UINT CardNo);
RTC5_API void __stdcall mark_serial(const UINT Mode, const UINT Digits);
RTC5_API void __stdcall mark_serial_abs(const UINT Mode, const UINT Digits);
RTC5_API void __stdcall mark_date(const UINT Part, const UINT Mode);
RTC5_API void __stdcall mark_date_abs(const UINT Part, const UINT Mode);
RTC5_API void __stdcall mark_time(const UINT Part, const UINT Mode);
RTC5_API void __stdcall mark_time_abs(const UINT Part, const UINT Mode);
RTC5_API void __stdcall time_fix_f_off(const UINT FirstDay, const UINT Offset);
RTC5_API void __stdcall select_serial_set_list(const UINT No);
RTC5_API void __stdcall set_serial_step_list(const UINT No, const UINT Step);
RTC5_API void __stdcall time_fix_f(const UINT FirstDay);
RTC5_API void __stdcall time_fix(void);
RTC5_API void __stdcall n_clear_io_cond_list(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Mask);
RTC5_API void __stdcall n_set_io_cond_list(const UINT CardNo, const UINT Mask1, const UINT Mask0, const UINT Mask);
RTC5_API void __stdcall n_write_io_port_mask_list(const UINT CardNo, const UINT Value, const UINT Mask);
RTC5_API void __stdcall n_write_8bit_port_list(const UINT CardNo, const UINT Value);
RTC5_API void __stdcall n_read_io_port_list(const UINT CardNo);
RTC5_API void __stdcall n_write_da_x_list(const UINT CardNo, const UINT x, const UINT Value);
RTC5_API void __stdcall n_write_io_port_list(const UINT CardNo, const UINT Value);
RTC5_API void __stdcall n_write_da_1_list(const UINT CardNo, const UINT Value);
RTC5_API void __stdcall n_write_da_2_list(const UINT CardNo, const UINT Value);
RTC5_API void __stdcall clear_io_cond_list(const UINT Mask1, const UINT Mask0, const UINT MaskClear);
RTC5_API void __stdcall set_io_cond_list(const UINT Mask1, const UINT Mask0, const UINT MaskSet);
RTC5_API void __stdcall write_io_port_mask_list(const UINT Value, const UINT Mask);
RTC5_API void __stdcall write_8bit_port_list(const UINT Value);
RTC5_API void __stdcall read_io_port_list(void);
RTC5_API void __stdcall write_da_x_list(const UINT x, const UINT Value);
RTC5_API void __stdcall write_io_port_list(const UINT Value);
RTC5_API void __stdcall write_da_1_list(const UINT Value);
RTC5_API void __stdcall write_da_2_list(const UINT Value);
RTC5_API void __stdcall n_laser_signal_on_list(const UINT CardNo);
RTC5_API void __stdcall n_laser_signal_off_list(const UINT CardNo);
RTC5_API void __stdcall n_para_laser_on_pulses_list(const UINT CardNo, const UINT Period, const UINT Pulses, const UINT P);
RTC5_API void __stdcall n_laser_on_pulses_list(const UINT CardNo, const UINT Period, const UINT Pulses);
RTC5_API void __stdcall n_laser_on_list(const UINT CardNo, const UINT Period);
RTC5_API void __stdcall n_set_laser_delays(const UINT CardNo, const long LaserOnDelay, const UINT LaserOffDelay);
RTC5_API void __stdcall n_set_standby_list(const UINT CardNo, const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall n_set_laser_pulses(const UINT CardNo, const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall n_set_firstpulse_killer_list(const UINT CardNo, const UINT Length);
RTC5_API void __stdcall n_set_qswitch_delay_list(const UINT CardNo, const UINT Delay);
RTC5_API void __stdcall n_set_laser_pin_out_list(const UINT CardNo, const UINT Pins);
RTC5_API void __stdcall n_set_vector_control(const UINT CardNo, const UINT Ctrl, const UINT Value);
RTC5_API void __stdcall n_set_default_pixel_list(const UINT CardNo, const UINT PulseLength);
RTC5_API void __stdcall n_set_port_default_list(const UINT CardNo, const UINT Port, const UINT Value);
RTC5_API void __stdcall n_set_auto_laser_params_list(const UINT CardNo, const UINT Ctrl, const UINT Value, const UINT MinValue, const UINT MaxValue);
RTC5_API void __stdcall n_set_pulse_picking_list(const UINT CardNo, const UINT No);
RTC5_API void __stdcall n_set_softstart_level_list(const UINT CardNo, const UINT Index, const UINT Level1, const UINT Level2, const UINT Level3);
RTC5_API void __stdcall n_set_softstart_mode_list(const UINT CardNo, const UINT Mode, const UINT Number, const UINT Delay);
RTC5_API void __stdcall n_config_laser_signals_list(const UINT CardNo, const UINT Config);
RTC5_API void __stdcall n_set_laser_timing(const UINT CardNo, const UINT HalfPeriod, const UINT PulseLength1, const UINT PulseLength2, const UINT TimeBase);
RTC5_API void __stdcall laser_signal_on_list(void);
RTC5_API void __stdcall laser_signal_off_list(void);
RTC5_API void __stdcall para_laser_on_pulses_list(const UINT Period, const UINT Pulses, const UINT P);
RTC5_API void __stdcall laser_on_pulses_list(const UINT Period, const UINT Pulses);
RTC5_API void __stdcall laser_on_list(const UINT Period);
RTC5_API void __stdcall set_laser_delays(const long LaserOnDelay, const UINT LaserOffDelay);
RTC5_API void __stdcall set_standby_list(const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall set_laser_pulses(const UINT HalfPeriod, const UINT PulseLength);
RTC5_API void __stdcall set_firstpulse_killer_list(const UINT Length);
RTC5_API void __stdcall set_qswitch_delay_list(const UINT Delay);
RTC5_API void __stdcall set_laser_pin_out_list(const UINT Pins);
RTC5_API void __stdcall set_vector_control(const UINT Ctrl, const UINT Value);
RTC5_API void __stdcall set_default_pixel_list(const UINT PulseLength);
RTC5_API void __stdcall set_port_default_list(const UINT Port, const UINT Value);
RTC5_API void __stdcall set_auto_laser_params_list(const UINT Ctrl, const UINT Value, const UINT MinValue, const UINT MaxValue);
RTC5_API void __stdcall set_pulse_picking_list(const UINT No);
RTC5_API void __stdcall set_softstart_level_list(const UINT Index, const UINT Level1, const UINT Level2, const UINT Level3);
RTC5_API void __stdcall set_softstart_mode_list(const UINT Mode, const UINT Number, const UINT Delay);
RTC5_API void __stdcall config_laser_signals_list(const UINT Config);
RTC5_API void __stdcall set_laser_timing(const UINT HalfPeriod, const UINT PulseLength1, const UINT PulseLength2, const UINT TimeBase);
RTC5_API void __stdcall n_fly_return_z(const UINT CardNo, const long X, const long Y, const long Z);
RTC5_API void __stdcall n_fly_return(const UINT CardNo, const long X, const long Y);
RTC5_API void __stdcall n_set_rot_center_list(const UINT CardNo, const long X, const long Y);
RTC5_API void __stdcall n_set_ext_start_delay_list(const UINT CardNo, const long Delay, const UINT EncoderNo);
RTC5_API void __stdcall n_set_fly_x(const UINT CardNo, const double ScaleX);
RTC5_API void __stdcall n_set_fly_y(const UINT CardNo, const double ScaleY);
RTC5_API void __stdcall n_set_fly_z(const UINT CardNo, const double ScaleZ, const UINT EndoderNo);
RTC5_API void __stdcall n_set_fly_rot(const UINT CardNo, const double Resolution);
RTC5_API void __stdcall n_set_fly_2d(const UINT CardNo, const double ScaleX, const double ScaleY);
RTC5_API void __stdcall n_set_fly_x_pos(const UINT CardNo, const double ScaleX);
RTC5_API void __stdcall n_set_fly_y_pos(const UINT CardNo, const double ScaleY);
RTC5_API void __stdcall n_set_fly_rot_pos(const UINT CardNo, const double Resolution);
RTC5_API void __stdcall n_set_fly_limits(const UINT CardNo, const long Xmin, const long Xmax, const long Ymin, const long Ymax);
RTC5_API void __stdcall n_set_fly_limits_z(const UINT CardNo, const long Zmin, const long Zmax);
RTC5_API void __stdcall n_if_fly_x_overflow(const UINT CardNo, const long Mode);
RTC5_API void __stdcall n_if_fly_y_overflow(const UINT CardNo, const long Mode);
RTC5_API void __stdcall n_if_fly_z_overflow(const UINT CardNo, const long Mode);
RTC5_API void __stdcall n_if_not_fly_x_overflow(const UINT CardNo, const long Mode);
RTC5_API void __stdcall n_if_not_fly_y_overflow(const UINT CardNo, const long Mode);
RTC5_API void __stdcall n_if_not_fly_z_overflow(const UINT CardNo, const long Mode);
RTC5_API void __stdcall n_clear_fly_overflow(const UINT CardNo, const UINT Mode);
RTC5_API void __stdcall n_set_mcbsp_x_list(const UINT CardNo, const double ScaleX);
RTC5_API void __stdcall n_set_mcbsp_y_list(const UINT CardNo, const double ScaleY);
RTC5_API void __stdcall n_set_mcbsp_rot_list(const UINT CardNo, const double Resolution);
RTC5_API void __stdcall n_set_mcbsp_matrix_list(const UINT CardNo);
RTC5_API void __stdcall n_set_mcbsp_in_list(const UINT CardNo, const UINT Mode, const double Scale);
RTC5_API void __stdcall n_set_multi_mcbsp_in_list(const UINT CardNo, const UINT Ctrl, const UINT P, const UINT Mode);
RTC5_API void __stdcall n_wait_for_encoder_mode(const UINT CardNo, const long Value, const UINT EncoderNo, const long Mode);
RTC5_API void __stdcall n_wait_for_mcbsp(const UINT CardNo, const UINT Axis, const long Value, const long Mode);
RTC5_API void __stdcall n_set_encoder_speed(const UINT CardNo, const UINT EncoderNo, const double Speed, const double Smooth);
RTC5_API void __stdcall n_get_mcbsp_list(const UINT CardNo);
RTC5_API void __stdcall n_store_encoder(const UINT CardNo, const UINT Pos);
RTC5_API void __stdcall n_wait_for_encoder_in_range(const UINT CardNo, const long EncXmin, const long EncXmax, const long EncYmin, const long EncYmax);
RTC5_API void __stdcall n_activate_fly_xy(const UINT CardNo, const double ScaleX, const double ScaleY);
RTC5_API void __stdcall n_activate_fly_2d(const UINT CardNo, const double ScaleX, const double ScaleY);
RTC5_API void __stdcall n_activate_fly_xy_encoder(const UINT CardNo, const double ScaleX, const double ScaleY, const long EncX, const long EncY);
RTC5_API void __stdcall n_activate_fly_2d_encoder(const UINT CardNo, const double ScaleX, const double ScaleY, const long EncX, const long EncY);
RTC5_API void __stdcall n_if_not_activated(const UINT CardNo);
RTC5_API void __stdcall n_park_position(const UINT CardNo, const UINT Mode, const long X, const long Y);
RTC5_API void __stdcall n_park_return(const UINT CardNo, const UINT Mode, const long X, const long Y);
RTC5_API void __stdcall n_wait_for_encoder(const UINT CardNo, const long Value, const UINT EncoderNo);
RTC5_API void __stdcall fly_return_z(const long X, const long Y, const long Z);
RTC5_API void __stdcall fly_return(const long X, const long Y);
RTC5_API void __stdcall set_rot_center_list(const long X, const long Y);
RTC5_API void __stdcall set_ext_start_delay_list(const long Delay, const UINT EncoderNo);
RTC5_API void __stdcall set_fly_x(const double ScaleX);
RTC5_API void __stdcall set_fly_y(const double ScaleY);
RTC5_API void __stdcall set_fly_z(const double ScaleZ, const UINT EncoderNo);
RTC5_API void __stdcall set_fly_rot(const double Resolution);
RTC5_API void __stdcall set_fly_2d(const double ScaleX, const double ScaleY);
RTC5_API void __stdcall set_fly_x_pos(const double ScaleX);
RTC5_API void __stdcall set_fly_y_pos(const double ScaleY);
RTC5_API void __stdcall set_fly_rot_pos(const double Resolution);
RTC5_API void __stdcall set_fly_limits(const long Xmin, const long Xmax, const long Ymin, const long Ymax);
RTC5_API void __stdcall set_fly_limits_z(const long Zmin, const long Zmax);
RTC5_API void __stdcall if_fly_x_overflow(const long Mode);
RTC5_API void __stdcall if_fly_y_overflow(const long Mode);
RTC5_API void __stdcall if_fly_z_overflow(const long Mode);
RTC5_API void __stdcall if_not_fly_x_overflow(const long Mode);
RTC5_API void __stdcall if_not_fly_y_overflow(const long Mode);
RTC5_API void __stdcall if_not_fly_z_overflow(const long Mode);
RTC5_API void __stdcall clear_fly_overflow(const UINT Mode);
RTC5_API void __stdcall set_mcbsp_x_list(const double ScaleX);
RTC5_API void __stdcall set_mcbsp_y_list(const double ScaleY);
RTC5_API void __stdcall set_mcbsp_rot_list(const double Resolution);
RTC5_API void __stdcall set_mcbsp_matrix_list(void);
RTC5_API void __stdcall set_mcbsp_in_list(const UINT Mode, const double Scale);
RTC5_API void __stdcall set_multi_mcbsp_in_list(const UINT Ctrl, const UINT P, const UINT Mode);
RTC5_API void __stdcall wait_for_encoder_mode(const long Value, const UINT EncoderNo, const long Mode);
RTC5_API void __stdcall wait_for_mcbsp(const UINT Axis, const long Value, const long Mode);
RTC5_API void __stdcall set_encoder_speed(const UINT EncoderNo, const double Speed, const double Smooth);
RTC5_API void __stdcall get_mcbsp_list(void);
RTC5_API void __stdcall store_encoder(const UINT Pos);
RTC5_API void __stdcall wait_for_encoder_in_range(const long EncXmin, const long EncXmax, const long EncYmin, const long EncYmax);
RTC5_API void __stdcall activate_fly_xy(const double ScaleX, const double ScaleY);
RTC5_API void __stdcall activate_fly_2d(const double ScaleX, const double ScaleY);
RTC5_API void __stdcall activate_fly_xy_encoder(const double ScaleX, const double ScaleY, const long EncX, const long EncY);
RTC5_API void __stdcall activate_fly_2d_encoder(const double ScaleX, const double ScaleY, const long EncX, const long EncY);
RTC5_API void __stdcall if_not_activated(void);
RTC5_API void __stdcall park_position(const UINT Mode, const long X, const long Y);
RTC5_API void __stdcall park_return(const UINT Mode, const long X, const long Y);
RTC5_API void __stdcall wait_for_encoder(const long Value, const UINT EncoderNo);
RTC5_API void __stdcall n_save_and_restart_timer(const UINT CardNo);
RTC5_API void __stdcall n_set_wobbel(const UINT CardNo, const UINT Transversal, const UINT Longitudinal, const double Freq);
RTC5_API void __stdcall n_set_wobbel_mode(const UINT CardNo, const UINT Transversal, const UINT Longitudinal, const double Freq, const long Mode);
RTC5_API void __stdcall n_set_wobbel_mode_phase(const UINT CardNo, const UINT Transversal, const UINT Longitudinal, const double Freq, const long Mode, const double Phase);
RTC5_API void __stdcall n_set_wobbel_direction(const UINT CardNo, const long dX, const long dY);
RTC5_API void __stdcall n_set_wobbel_control(const UINT CardNo, const UINT Ctrl, const UINT Value, const UINT MinValue, const UINT MaxValue);
RTC5_API void __stdcall n_set_wobbel_vector(const UINT CardNo, const double dTrans, const double dLong, const UINT Period, const double dPower);
RTC5_API void __stdcall n_set_wobbel_offset(const UINT CardNo, const long OffsetTrans, const long OffsetLong);
RTC5_API void __stdcall n_load_wobbel_power_list(const UINT CardNo, const UINT TableNo, const ULONG_PTR Ptr, const long Flag);
RTC5_API void __stdcall n_set_wobbel_power_angle(const UINT CardNo, const UINT Angle);
RTC5_API void __stdcall n_set_trigger(const UINT CardNo, const UINT Period, const UINT Signal1, const UINT Signal2);
RTC5_API void __stdcall n_set_trigger4(const UINT CardNo, const UINT Period, const UINT Signal1, const UINT Signal2, const UINT Signal3, const UINT Signal4);
RTC5_API void __stdcall n_set_pixel_line_3d(const UINT CardNo, const UINT Channel, const UINT HalfPeriod, const double dX, const double dY, const double dZ);
RTC5_API void __stdcall n_set_pixel_line(const UINT CardNo, const UINT Channel, const UINT HalfPeriod, const double dX, const double dY);
RTC5_API void __stdcall n_stretch_pixel_line(const UINT CardNo, const UINT Delay, const UINT Period);
RTC5_API void __stdcall n_set_n_pixel(const UINT CardNo, const UINT PulseLength, const UINT AnalogOut, const UINT Number);
RTC5_API void __stdcall n_set_pixel(const UINT CardNo, const UINT PulseLength, const UINT AnalogOut);
RTC5_API void __stdcall n_rs232_write_text_list(const UINT CardNo, const char* pData);
RTC5_API void __stdcall n_set_mcbsp_out(const UINT CardNo, const UINT Signal1, const UINT Signal2);
RTC5_API void __stdcall n_camming(const UINT CardNo, const UINT FirstPos, const UINT NPos, const UINT No, const UINT Ctrl, const double Scale, const UINT Code);
RTC5_API void __stdcall n_periodic_toggle_list(const UINT CardNo, const UINT Port, const UINT Mask, const UINT P1, const UINT P2, const UINT Count, const UINT Start);
RTC5_API void __stdcall n_micro_vector_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const long LasOn, const long LasOf);
RTC5_API void __stdcall n_micro_vector_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const long LasOn, const long LasOf);
RTC5_API void __stdcall n_micro_vector_abs(const UINT CardNo, const long X, const long Y, const long LasOn, const long LasOf);
RTC5_API void __stdcall n_micro_vector_rel(const UINT CardNo, const long dX, const long dY, const long LasOn, const long LasOf);
RTC5_API void __stdcall n_set_free_variable_list(const UINT CardNo, const UINT VarNo, const UINT Value);
RTC5_API void __stdcall n_control_command_list(const UINT CardNo, const UINT Head, const UINT Axis, const UINT Data);
RTC5_API void __stdcall n_jump_abs_drill_2(const UINT CardNo, const long X, const long Y, const UINT DrillTime, const long XOff, const long YOff);
RTC5_API void __stdcall n_jump_rel_drill_2(const UINT CardNo, const long dX, const long dY, const UINT DrillTime, const long XOff, const long YOff);
RTC5_API void __stdcall n_jump_abs_drill(const UINT CardNo, const long X, const long Y, const UINT DrillTime);
RTC5_API void __stdcall n_jump_rel_drill(const UINT CardNo, const long dX, const long dY, const UINT DrillTime);
RTC5_API void __stdcall save_and_restart_timer(void);
RTC5_API void __stdcall set_wobbel(const UINT Transversal, const UINT Longitudinal, const double Freq);
RTC5_API void __stdcall set_wobbel_mode(const UINT Transversal, const UINT Longitudinal, const double Freq, const long Mode);
RTC5_API void __stdcall set_wobbel_mode_phase(const UINT Transversal, const UINT Longitudinal, const double Freq, const long Mode, const double Phase);
RTC5_API void __stdcall set_wobbel_direction(const long dX, const long dY);
RTC5_API void __stdcall set_wobbel_control(const UINT Ctrl, const UINT Value, const UINT MinValue, const UINT MaxValue);
RTC5_API void __stdcall set_wobbel_vector(const double dTrans, const double dLong, const UINT Period, const double dPower);
RTC5_API void __stdcall set_wobbel_offset(const long OffsetTrans, const long OffsetLong);
RTC5_API void __stdcall load_wobbel_power_list(const UINT TableNo, const ULONG_PTR Ptr, const long Flag);
RTC5_API void __stdcall set_wobbel_power_angle(const UINT Angle);
RTC5_API void __stdcall set_trigger(const UINT Period, const UINT Signal1, const UINT Signal2);
RTC5_API void __stdcall set_trigger4(const UINT Period, const UINT Signal1, const UINT Signal2, const UINT Signal3, const UINT Signal4);
RTC5_API void __stdcall set_pixel_line_3d(const UINT Channel, const UINT HalfPeriod, const double dX, const double dY, const double dZ);
RTC5_API void __stdcall set_pixel_line(const UINT Channel, const UINT HalfPeriod, const double dX, const double dY);
RTC5_API void __stdcall stretch_pixel_line(const UINT Delay, const UINT Period);
RTC5_API void __stdcall set_n_pixel(const UINT PulseLength, const UINT AnalogOut, const UINT Number);
RTC5_API void __stdcall set_pixel(const UINT PulseLength, const UINT AnalogOut);
RTC5_API void __stdcall rs232_write_text_list(const char* pData);
RTC5_API void __stdcall set_mcbsp_out(const UINT Signal1, const UINT Signal2);
RTC5_API void __stdcall camming(const UINT FirstPos, const UINT NPos, const UINT No, const UINT Ctrl, const double Scale, const UINT Code);
RTC5_API void __stdcall periodic_toggle_list(const UINT Port, const UINT Mask, const UINT P1, const UINT P2, const UINT Count, const UINT Start);
RTC5_API void __stdcall micro_vector_abs_3d(const long X, const long Y, const long Z, const long LasOn, const long LasOf);
RTC5_API void __stdcall micro_vector_rel_3d(const long dX, const long dY, const long dZ, const long LasOn, const long LasOf);
RTC5_API void __stdcall micro_vector_abs(const long X, const long Y, const long LasOn, const long LasOf);
RTC5_API void __stdcall micro_vector_rel(const long dX, const long dY, const long LasOn, const long LasOf);
RTC5_API void __stdcall set_free_variable_list(const UINT VarNo, const UINT Value);
RTC5_API void __stdcall control_command_list(const UINT Head, const UINT Axis, const UINT Data);
RTC5_API void __stdcall jump_abs_drill_2(const long X, const long Y, const UINT DrillTime, const long XOff, const long YOff);
RTC5_API void __stdcall jump_rel_drill_2(const long dX, const long dY, const UINT DrillTime, const long XOff, const long YOff);
RTC5_API void __stdcall jump_abs_drill(const long X, const long Y, const UINT DrillTime);
RTC5_API void __stdcall jump_rel_drill(const long dX, const long dY, const UINT DrillTime);
RTC5_API void __stdcall n_timed_mark_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const double T);
RTC5_API void __stdcall n_timed_mark_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const double T);
RTC5_API void __stdcall n_timed_mark_abs(const UINT CardNo, const long X, const long Y, const double T);
RTC5_API void __stdcall n_timed_mark_rel(const UINT CardNo, const long dX, const long dY, const double T);
RTC5_API void __stdcall timed_mark_abs_3d(const long X, const long Y, const long Z, const double T);
RTC5_API void __stdcall timed_mark_rel_3d(const long dX, const long dY, const long dZ, const double T);
RTC5_API void __stdcall timed_mark_abs(const long X, const long Y, const double T);
RTC5_API void __stdcall timed_mark_rel(const long dX, const long dY, const double T);
RTC5_API void __stdcall n_mark_abs_3d(const UINT CardNo, const long X, const long Y, const long Z);
RTC5_API void __stdcall n_mark_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ);
RTC5_API void __stdcall n_mark_abs(const UINT CardNo, const long X, const long Y);
RTC5_API void __stdcall n_mark_rel(const UINT CardNo, const long dX, const long dY);
RTC5_API void __stdcall mark_abs_3d(const long X, const long Y, const long Z);
RTC5_API void __stdcall mark_rel_3d(const long dX, const long dY, const long dZ);
RTC5_API void __stdcall mark_abs(const long X, const long Y);
RTC5_API void __stdcall mark_rel(const long dX, const long dY);
RTC5_API void __stdcall n_timed_jump_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const double T);
RTC5_API void __stdcall n_timed_jump_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const double T);
RTC5_API void __stdcall n_timed_jump_abs(const UINT CardNo, const long X, const long Y, const double T);
RTC5_API void __stdcall n_timed_jump_rel(const UINT CardNo, const long dX, const long dY, const double T);
RTC5_API void __stdcall timed_jump_abs_3d(const long X, const long Y, const long Z, const double T);
RTC5_API void __stdcall timed_jump_rel_3d(const long dX, const long dY, const long dZ, const double T);
RTC5_API void __stdcall timed_jump_abs(const long X, const long Y, const double T);
RTC5_API void __stdcall timed_jump_rel(const long dX, const long dY, const double T);
RTC5_API void __stdcall n_jump_abs_3d(const UINT CardNo, const long X, const long Y, const long Z);
RTC5_API void __stdcall n_jump_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ);
RTC5_API void __stdcall n_jump_abs(const UINT CardNo, const long X, const long Y);
RTC5_API void __stdcall n_jump_rel(const UINT CardNo, const long dX, const long dY);
RTC5_API void __stdcall jump_abs_3d(const long X, const long Y, const long Z);
RTC5_API void __stdcall jump_rel_3d(const long dX, const long dY, const long dZ);
RTC5_API void __stdcall jump_abs(const long X, const long Y);
RTC5_API void __stdcall jump_rel(const long dX, const long dY);
RTC5_API void __stdcall n_para_mark_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const UINT P);
RTC5_API void __stdcall n_para_mark_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const UINT P);
RTC5_API void __stdcall n_para_mark_abs(const UINT CardNo, const long X, const long Y, const UINT P);
RTC5_API void __stdcall n_para_mark_rel(const UINT CardNo, const long dX, const long dY, const UINT P);
RTC5_API void __stdcall para_mark_abs_3d(const long X, const long Y, const long Z, const UINT P);
RTC5_API void __stdcall para_mark_rel_3d(const long dX, const long dY, const long dZ, const UINT P);
RTC5_API void __stdcall para_mark_abs(const long X, const long Y, const UINT P);
RTC5_API void __stdcall para_mark_rel(const long dX, const long dY, const UINT P);
RTC5_API void __stdcall n_para_jump_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const UINT P);
RTC5_API void __stdcall n_para_jump_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const UINT P);
RTC5_API void __stdcall n_para_jump_abs(const UINT CardNo, const long X, const long Y, const UINT P);
RTC5_API void __stdcall n_para_jump_rel(const UINT CardNo, const long dX, const long dY, const UINT P);
RTC5_API void __stdcall para_jump_abs_3d(const long X, const long Y, const long Z, const UINT P);
RTC5_API void __stdcall para_jump_rel_3d(const long dX, const long dY, const long dZ, const UINT P);
RTC5_API void __stdcall para_jump_abs(const long X, const long Y, const UINT P);
RTC5_API void __stdcall para_jump_rel(const long dX, const long dY, const UINT P);
RTC5_API void __stdcall n_timed_para_mark_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const UINT P, const double T);
RTC5_API void __stdcall n_timed_para_mark_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const UINT P, const double T);
RTC5_API void __stdcall n_timed_para_jump_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const UINT P, const double T);
RTC5_API void __stdcall n_timed_para_jump_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const UINT P, const double T);
RTC5_API void __stdcall n_timed_para_mark_abs(const UINT CardNo, const long X, const long Y, const UINT P, const double T);
RTC5_API void __stdcall n_timed_para_mark_rel(const UINT CardNo, const long dX, const long dY, const UINT P, const double T);
RTC5_API void __stdcall n_timed_para_jump_abs(const UINT CardNo, const long X, const long Y, const UINT P, const double T);
RTC5_API void __stdcall n_timed_para_jump_rel(const UINT CardNo, const long dX, const long dY, const UINT P, const double T);
RTC5_API void __stdcall timed_para_mark_abs_3d(const long X, const long Y, const long Z, const UINT P, const double T);
RTC5_API void __stdcall timed_para_mark_rel_3d(const long dX, const long dY, const long dZ, const UINT P, const double T);
RTC5_API void __stdcall timed_para_jump_abs_3d(const long X, const long Y, const long Z, const UINT P, const double T);
RTC5_API void __stdcall timed_para_jump_rel_3d(const long dX, const long dY, const long dZ, const UINT P, const double T);
RTC5_API void __stdcall timed_para_mark_abs(const long X, const long Y, const UINT P, const double T);
RTC5_API void __stdcall timed_para_mark_rel(const long dX, const long dY, const UINT P, const double T);
RTC5_API void __stdcall timed_para_jump_abs(const long X, const long Y, const UINT P, const double T);
RTC5_API void __stdcall timed_para_jump_rel(const long dX, const long dY, const UINT P, const double T);
RTC5_API void __stdcall n_set_defocus_list(const UINT CardNo, const long Shift);
RTC5_API void __stdcall n_set_defocus_offset_list(const UINT CardNo, const long Shift);
RTC5_API void __stdcall n_set_zoom_list(const UINT CardNo, const UINT Zoom);
RTC5_API void __stdcall set_defocus_list(const long Shift);
RTC5_API void __stdcall set_defocus_offset_list(const long Shift);
RTC5_API void __stdcall set_zoom_list(const UINT Zoom);
RTC5_API void __stdcall n_timed_arc_abs(const UINT CardNo, const long X, const long Y, const double Angle, const double T);
RTC5_API void __stdcall n_timed_arc_rel(const UINT CardNo, const long dX, const long dY, const double Angle, const double T);
RTC5_API void __stdcall timed_arc_abs(const long X, const long Y, const double Angle, const double T);
RTC5_API void __stdcall timed_arc_rel(const long dX, const long dY, const double Angle, const double T);
RTC5_API void __stdcall n_arc_abs_3d(const UINT CardNo, const long X, const long Y, const long Z, const double Angle);
RTC5_API void __stdcall n_arc_rel_3d(const UINT CardNo, const long dX, const long dY, const long dZ, const double Angle);
RTC5_API void __stdcall n_arc_abs(const UINT CardNo, const long X, const long Y, const double Angle);
RTC5_API void __stdcall n_arc_rel(const UINT CardNo, const long dX, const long dY, const double Angle);
RTC5_API void __stdcall n_set_ellipse(const UINT CardNo, const UINT A, const UINT B, const double Phi0, const double Phi);
RTC5_API void __stdcall n_mark_ellipse_abs(const UINT CardNo, const long X, const long Y, const double Alpha);
RTC5_API void __stdcall n_mark_ellipse_rel(const UINT CardNo, const long dX, const long dY, const double Alpha);
RTC5_API void __stdcall arc_abs_3d(const long X, const long Y, const long Z, const double Angle);
RTC5_API void __stdcall arc_rel_3d(const long dX, const long dY, const long dZ, const double Angle);
RTC5_API void __stdcall arc_abs(const long X, const long Y, const double Angle);
RTC5_API void __stdcall arc_rel(const long dX, const long dY, const double Angle);
RTC5_API void __stdcall set_ellipse(const UINT A, const UINT B, const double Phi0, const double Phi);
RTC5_API void __stdcall mark_ellipse_abs(const long X, const long Y, const double Alpha);
RTC5_API void __stdcall mark_ellipse_rel(const long dX, const long dY, const double Alpha);
RTC5_API void __stdcall n_set_offset_xyz_list(const UINT CardNo, const UINT HeadNo, const long XOffset, const long YOffset, const long ZOffset, const UINT at_once);
RTC5_API void __stdcall n_set_offset_list(const UINT CardNo, const UINT HeadNo, const long XOffset, const long YOffset, const UINT at_once);
RTC5_API void __stdcall n_set_matrix_list(const UINT CardNo, const UINT HeadNo, const UINT Ind1, const UINT Ind2, const double Mij, const UINT at_once);
RTC5_API void __stdcall n_set_angle_list(const UINT CardNo, const UINT HeadNo, const double Angle, const UINT at_once);
RTC5_API void __stdcall n_set_scale_list(const UINT CardNo, const UINT HeadNo, const double Scale, const UINT at_once);
RTC5_API void __stdcall n_apply_mcbsp_list(const UINT CardNo, const UINT HeadNo, const UINT at_once);
RTC5_API void __stdcall set_offset_xyz_list(const UINT HeadNo, const long XOffset, const long YOffset, const long ZOffset, const UINT at_once);
RTC5_API void __stdcall set_offset_list(const UINT HeadNo, const long XOffset, const long YOffset, const UINT at_once);
RTC5_API void __stdcall set_matrix_list(const UINT HeadNo, const UINT Ind1, const UINT Ind2, const double Mij, const UINT at_once);
RTC5_API void __stdcall set_angle_list(const UINT HeadNo, const double Angle, const UINT at_once);
RTC5_API void __stdcall set_scale_list(const UINT HeadNo, const double Scale, const UINT at_once);
RTC5_API void __stdcall apply_mcbsp_list(const UINT HeadNo, const UINT at_once);
RTC5_API void __stdcall n_set_mark_speed(const UINT CardNo, const double Speed);
RTC5_API void __stdcall n_set_jump_speed(const UINT CardNo, const double Speed);
RTC5_API void __stdcall n_set_sky_writing_para_list(const UINT CardNo, const double Timelag, const long LaserOnShift, const UINT Nprev, const UINT Npost);
RTC5_API void __stdcall n_set_sky_writing_list(const UINT CardNo, const double Timelag, const long LaserOnShift);
RTC5_API void __stdcall n_set_sky_writing_limit_list(const UINT CardNo, const double CosAngle);
RTC5_API void __stdcall n_set_sky_writing_mode_list(const UINT CardNo, const UINT Mode);
RTC5_API void __stdcall n_set_scanner_delays(const UINT CardNo, const UINT Jump, const UINT Mark, const UINT Polygon);
RTC5_API void __stdcall n_set_jump_mode_list(const UINT CardNo, const long Flag);
RTC5_API void __stdcall n_enduring_wobbel(const UINT CardNo);
RTC5_API void __stdcall n_set_delay_mode_list(const UINT CardNo, const UINT VarPoly, const UINT DirectMove3D, const UINT EdgeLevel, const UINT MinJumpDelay, const UINT JumpLengthLimit);
RTC5_API void __stdcall set_mark_speed(const double Speed);
RTC5_API void __stdcall set_jump_speed(const double Speed);
RTC5_API void __stdcall set_sky_writing_para_list(const double Timelag, const long LaserOnShift, const UINT Nprev, const UINT Npost);
RTC5_API void __stdcall set_sky_writing_list(const double Timelag, const long LaserOnShift);
RTC5_API void __stdcall set_sky_writing_limit_list(const double CosAngle);
RTC5_API void __stdcall set_sky_writing_mode_list(const UINT Mode);
RTC5_API void __stdcall set_scanner_delays(const UINT Jump, const UINT Mark, const UINT Polygon);
RTC5_API void __stdcall set_jump_mode_list(const long Flag);
RTC5_API void __stdcall enduring_wobbel(void);
RTC5_API void __stdcall set_delay_mode_list(const UINT VarPoly, const UINT DirectMove3D, const UINT EdgeLevel, const UINT MinJumpDelay, const UINT JumpLengthLimit);
RTC5_API void __stdcall n_stepper_enable_list(const UINT CardNo, const long Enable1, const long Enable2);
RTC5_API void __stdcall n_stepper_control_list(const UINT CardNo, const long Period1, const long Period2);
RTC5_API void __stdcall n_stepper_abs_no_list(const UINT CardNo, const UINT No, const long Pos);
RTC5_API void __stdcall n_stepper_rel_no_list(const UINT CardNo, const UINT No, const long dPos);
RTC5_API void __stdcall n_stepper_abs_list(const UINT CardNo, const long Pos1, const long Pos2);
RTC5_API void __stdcall n_stepper_rel_list(const UINT CardNo, const long dPos1, const long dPos2);
RTC5_API void __stdcall n_stepper_wait(const UINT CardNo, const UINT No);
RTC5_API void __stdcall stepper_enable_list(const long Enable1, const long Enable2);
RTC5_API void __stdcall stepper_control_list(const long Period1, const long Period2);
RTC5_API void __stdcall stepper_abs_no_list(const UINT No, const long Pos);
RTC5_API void __stdcall stepper_rel_no_list(const UINT No, const long dPos);
RTC5_API void __stdcall stepper_abs_list(const long Pos1, const long Pos2);
RTC5_API void __stdcall stepper_rel_list(const long dPos1, const long dPos2);
RTC5_API void __stdcall stepper_wait(const UINT No);
#if defined(__cplusplus)
} // extern "C"
#endif //defined(__cplusplus)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,222 @@
#pragma once
#include "../stdafx.h"
#include "../job/BPBinary.h"
#include "../job/MetaData.h"
#include "BaseCtrl.h"
#include "IntelliScanState.h"
#include <vector>
#include <bitset>
#include <unordered_set>
struct polygon {
float xval, yval;
};
typedef struct DataBlockInfo
{
BPBinary::BinDataBlock* bdb;
MetaData::Part* part;
MetaData::ParameterSet* ps;
int order;
int delayTime;
bool isFinished;
DataBlockInfo(BPBinary::BinDataBlock* _bdb, MetaData::Part* _part, MetaData::ParameterSet* _ps, int _order, int _delayTime)
:bdb(_bdb)
, part(_part)
, ps(_ps)
, order(_order)
, delayTime(_delayTime)
, isFinished(false)
{}
} DataBlockInfo;
class OrderMap {
public:
int m_Order;
queue<DataBlockInfo*> m_DBS;
};
class Scanner : public BaseCtrl
{
public:
enum DebugShape
{
Cross = 0,
Square,
PointLaser,
DefocusLenth,
HLine,
VLine,
MulPoints,
MulJumpPoints,
Vector
};
public:
Scanner(ScannerControlCfg* cfg);
~Scanner();
virtual void GetInfo(vector<string>& ins) {}
void AddDataBlock(BPBinary::BinDataBlock* bdb, MetaData::Part* part, MetaData::ParameterSet* ps,int _order,int _delayTime);
//virtual int GetSerialNum() { return m_LaserCfg->m_Cno; }
virtual void SetXyOffset(float x, float y) = 0;
virtual void SetAngle(double angle) = 0;
virtual void UpdateSetting() = 0;
virtual void UpdateSkyWriting(bool islist) {}
virtual void SetSkyWritingEnable(bool benable, bool islist) {}
virtual void SetXYCorrect(double x, double y)
{
m_xfactor = m_kfactor*x;
m_yfactor = m_kfactor*y;
}
virtual void SetK(double k){}
double GetK() { return m_kfactor; }
ScannerControlCfg* GetConfig() { return m_ScannerControlCfg; }
bool IsDebugEnable();
void StartDebugTest();
void StopDebugTest();
virtual bool BeginWork();
virtual bool PauseWork() { return true; }
virtual void WaitFinish();
virtual void Clean();
void StartHeatingScannerTest();
void StopHeatingScannerTest();
bool IsHeatingScannerTest();
void WaitHeatingScanner();
void StartGetScanInfo();
void StopGetScanInfo();
void SetAutoUpdateScanInfo(bool isauto);
void GetXYScanState(ScanStateXY* scanstate, time_t &t);
virtual void UpdateScannerInfo() {}
//bool IsUpScanner();
void static ResetScaningLimit() {
EnterCriticalSection(&m_SeqCS);
m_ScaningBit.reset();
m_SeqDataUnFinishBit.reset();
m_SupportSeqDataUnFinishBit.reset();
LeaveCriticalSection(&m_SeqCS);
}
virtual void ResetDefocus() = 0;
void SetPairScan(Scanner* sc) { m_PairScan = sc; }
virtual void UpdateScanParamByCfg(ScanParamCfg* cfg) = 0;
protected:
static DWORD WINAPI DebugProc(Scanner* _this);
virtual void ScanDebug() {}
static DWORD WINAPI ScanProc(Scanner* _this);
virtual void Scan();
virtual void ScanSeqV2();
virtual unsigned int GetMemorySize() = 0;
virtual void LoadList(unsigned int listid, bool iswait) = 0;
virtual void EndList() = 0;
virtual void ListExecute(unsigned int listid, bool iswait) = 0;
virtual void AutoChangeList() = 0;
virtual void WaitListFree() = 0;
virtual void SetScanSpeed(double value) = 0;
virtual void SetPower(double watt) = 0;
virtual void SetDefocus(float value) = 0;
virtual void AddVector(double startx, double starty, double endx, double endy) = 0;
virtual void ListNop() = 0;
virtual void JumpAbs(double x, double y) = 0;
virtual void MarkAbs(double x, double y) = 0;
virtual void HeatingScannerRun() {}
virtual void ScannerInfoRun() {}
static uint64_t GetLimitCodeV2(int ivalue);
void ScanDataBlock(DataBlockInfo* Printdbi);
map<int, int>* GetOrderDataCountMap() { return &m_OrderDataCountMap; }
private:
static DWORD WINAPI ScannerInfoProc(Scanner* _this);
static DWORD WINAPI HeatingScannerProc(Scanner* _this);
public:
uint64_t m_JobStartTime;
bool m_IsOrderSeqV2;
static map<int, unsigned int> m_CurrentSerio;
protected:
vector<DataBlockInfo*> m_ScanData;
vector<DataBlockInfo*> m_SupportSeq;
queue<DataBlockInfo*> m_ZeroSeq;
//LaserCfg* m_LaserCfg;
ScannerControlCfg* m_ScannerControlCfg;
RunCfg* m_RunCfg;
ExtCfg* m_ExtCfg;
HANDLE m_DebugThread;
bool m_DebugFlag;
TimePowerCompensateCfg* m_TimePowerCompensateCfg;
PowerCompensateCfg* m_PowerCompensateCfg;
CorrectParamCfg* m_CorrectParamCfg;
SkyWritingCfg* m_SkyWritingCfg;
ScanParamCfg* m_ScanParamCfg;
ScanTestCfg* m_ScanTestCfg;
MachineCfg* m_MachineCfg;
AlarmCfgWrapper* m_AlarmCfgWrapper;
IOCfg* m_ScannerIO;
HANDLE m_Thread;
HANDLE m_HeatingScannerThread;
bool m_HeatingScannerRunFlag;
unsigned int m_list_memory;
unsigned int m_laser_control;
double m_output_vfactor;
double m_kfactor;
double m_xfactor;
double m_yfactor;
double m_zfactor;
double m_workingdis;
double m_Angle;
double m_Radians;
HANDLE m_InfoThread;
bool m_InfoRunFlag;
bool m_IsAutoInfo;
CRITICAL_SECTION m_ScannerInfoCS;
time_t m_ScanStateUpdateTime;
ScanStateXY m_ScanState;
double m_XOffsetAssist;
double m_YOffsetAssist;
//bitset<32> m_SeqBit;
map<int, int> m_OrderDataCountMap;
map<int, OrderMap*> m_OrderMap;
map<string, ScanParamCfg*> m_ScanParamCfgMap;
//unordered_set<int> m_OrderSeq;
bool m_IsLeftScan;
Scanner* m_PairScan;
static bitset<64> m_ScaningBit;
static CRITICAL_SECTION m_SeqCS;
static map<int, uint64_t> m_LimitMap2;
static map<int, uint64_t> m_HorizontalSeq2;
static bitset<8> m_SeqDataUnFinishBit;
static bitset<8> m_SupportSeqDataUnFinishBit;
static const int m_SeqCount = 32;
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,135 @@
#pragma once
#include "../stdafx.h"
#include "BaseCtrl.h"
#include "../Purifier/BasePurifier.h"
#include "Scanner.h"
#include "../Machine/Machine.h"
//#include "../PLC/MachineCtrl.h"
//#include "../camera/HBDCamera.h"
//#include "../RecoatCheck/RecoatCheck.h"
#include "../Communication/ServoManager.h"
#include "ScannerPair.h"
#include "../Communication/ScannerPowerClient.h"
class RemoteClient;
class ScannerCtrl : public BaseCtrl
{
typedef ScannerCtrl thisClass;
public:
ScannerCtrl();
~ScannerCtrl();
bool Init();
//void GetInfo(vector<string>& ins) { return m_scan->GetInfo(ins); }
bool BeginWork();
bool PauseWork();
void PauseAuto();
bool StopWork();
bool IsTestLayerEnable();
void StopRedTest();
void TestLayer();
vector<Scanner*>* GetScanners() { return &m_scan; }
//JobController* GetJobController() { return m_job_controller; }
void RemoveScanner(int seq);
void SetPurifierClient(BasePurifier* purifierClient) {
m_PurifierClient = purifierClient;
}
void SetScannerPowerClient(ScannerPowerClient* spc) { m_ScannerPowerClient = spc; }
void GetInitErrorInfos(vector<string>& vec);
bool HasInitError() { return !m_InitErrorInfos.empty(); }
void ModelScan(void);
void StopModelScan(void);
//void SetMachineCtrl(MachineCtrl* machineCtrl) {
// m_MachineCtrl = machineCtrl;
//}
bool IsHeatingScannerEnable();
//void SetCamera(HBDCamera* camera) { m_Camera = camera; }
//void SetRecoatCheck(RecoatCheck* rc) { m_RecoatCheck = rc; }
//void SetServoManager(ServoManager* servoManager) { m_ServoManager = servoManager; }
void StartHeatingMotion();
void StopHeatingMotion(bool iswait);
void SetRemoteClient(RemoteClient* rc) { m_RemoteClient = rc; }
void DrawFinishReport();
void CallFun();
SCANCTRLFUN
private:
static DWORD WINAPI PrintProc(thisClass* _this);
static DWORD WINAPI RedPrintTestProc(thisClass* _this);
static DWORD WINAPI ModelScanProc(thisClass* _this);
static DWORD WINAPI ReleasePressureProc(thisClass* _this);
static DWORD WINAPI HeatingMotionProc(ScannerCtrl* _this);
void HeatingMotionRun();
void PrintRun();
bool ReadyPrint(bool startAfterPause);
void CtrlWhenStop();
void CtrlIoWhenExit();
void DispatchDataBlock();
void DispatchTestDataBlock();
void DispatchModelDataBlock(int partId, string scanType, float power, float speed);
public:
string m_PauseMsg;
string m_StopMsg;
vector<AlarmCfg*> m_StopAlarms;
vector<AlarmCfg*> m_PauseAlarms;
private:
vector<Scanner*> m_scan;
HANDLE m_print_thread;
HANDLE m_RedPrintTestThread;
CRITICAL_SECTION m_LayerTestCs;
BasePurifier* m_PurifierClient;
RunCfg* m_RunCfg;
MachineCfg* m_MachineCfg;
Machine* m_Machine;
IOCfgWrapper* m_IOCfgWrapper;
//CoverCfg* m_CoverCfg;
PowderEstimateCfg* m_PowderEstimateCfg;
ExtCfg* m_ExtCfg;
ServoManager* m_ServoManager;
//MachineCtrl* m_MachineCtrl;
AlarmCfgWrapper* m_AlarmCfgWrapper;
HANDLE m_PressureThread;
bool m_PressureCtrlFlag;
unsigned int m_DownSkinStopFlag;
bool m_IsDownSkinContinue;
//HBDCamera* m_Camera;
//RecoatCheck* m_RecoatCheck;
//RecoatCheckCfg* m_RecoatCheckCfg;
ScannerPowerClient* m_ScannerPowerClient;
HANDLE m_HeatingMotionThread;
bool m_HeatingMotionFlag;
//ScannerPair* m_UpScannerPair;
//ScannerPair* m_DownScannerPair;
RemoteClient* m_RemoteClient;
bool m_ShowFinishReport;
time_t m_LastSendFinishReportTime;
//vector<BPBinary::BinDataBlock*> m_RedTestDBS;
//vector<BPBinary::BinDataBlock*> m_ModeTestDBS;
};

View File

@ -0,0 +1,112 @@
#include "ScannerPair.h"
#include <atlbase.h>
ScannerPair::ScannerPair()
:m_Thread(INVALID_HANDLE_VALUE)
{
}
ScannerPair::~ScannerPair()
{
ClearData();
}
void ScannerPair::ClearData()
{
for (list<ScannerPairDBInfo*>::iterator it = m_LeftDatas.begin(); it != m_LeftDatas.end();it++) {
ScannerPairDBInfo* dbi = (*it);
delete dbi;
dbi = NULL;
}
m_LeftDatas.clear();
for (list<ScannerPairDBInfo*>::iterator it = m_RightDatas.begin(); it != m_RightDatas.end(); it++) {
ScannerPairDBInfo* dbi = (*it);
delete dbi;
dbi = NULL;
}
m_RightDatas.clear();
while (!m_LeftZeroSeqDatas.empty()) {
ScannerPairDBInfo * info= m_LeftZeroSeqDatas.front();
delete info;
info = NULL;
m_LeftZeroSeqDatas.pop();
}
while (!m_RightZeroSeqDatas.empty()) {
ScannerPairDBInfo * info = m_RightZeroSeqDatas.front();
delete info;
info = NULL;
m_RightZeroSeqDatas.pop();
}
}
void ScannerPair::WaitFinished()
{
if (m_Thread == INVALID_HANDLE_VALUE)return;
WaitForSingleObject(m_Thread, INFINITE);
ClearData();
CloseHandle(m_Thread);
m_Thread = INVALID_HANDLE_VALUE;
}
void ScannerPair::BeginWork()
{
if (m_RightDatas.empty() && m_LeftDatas.empty() && m_LeftZeroSeqDatas.empty() && m_RightZeroSeqDatas.empty())return ;
if (m_Thread != INVALID_HANDLE_VALUE) {
m_LeftScanner->StopWork();
m_RightScanner->StopWork();
TerminateThread(m_Thread, 1);
CloseHandle(m_Thread);
m_Thread = INVALID_HANDLE_VALUE;
}
m_Thread = AtlCreateThread(ScanProc, this);
}
DWORD ScannerPair::ScanProc(ScannerPair* _this)
{
if (_this) {
_this->Scan();
}
return 0;
}
void ScannerPair::Scan()
{
/*for (set<int>::iterator it = m_OrderSet.begin(); it != m_OrderSet.end();it++) {
if (BaseCtrl::IsStop())break;
int order = (*it);
while (!m_LeftDatas.empty()) {
ScannerPairDBInfo* info= m_LeftDatas.front();
if (info->m_DB->order == order) {
m_LeftScanner->AddDataBlock(info->m_BDB, info->m_Part, info->m_PS);
m_LeftDatas.pop();
}
else {
break;
}
}
while (!m_RightDatas.empty()) {
ScannerPairDBInfo* info = m_RightDatas.front();
if (info->m_DB->order == order) {
m_RightScanner->AddDataBlock(info->m_BDB, info->m_Part, info->m_PS);
m_RightDatas.pop();
}
else {
break;
}
}
if (BaseCtrl::IsStop())break;
m_LeftScanner->BeginWork();
m_RightScanner->BeginWork();
Sleep(5);
m_LeftScanner->WaitFinish();
m_RightScanner->WaitFinish();
}
ClearData();*/
}

View File

@ -0,0 +1,80 @@
#pragma once
#include <set>
using namespace std;
#include "Scanner.h"
class ScannerPairDBInfo {
public:
ScannerPairDBInfo(MetaData::DataBlock* db, BPBinary::BinDataBlock* bdb, MetaData::Part* part, MetaData::ParameterSet* ps) {
m_DB = db;
m_BDB = bdb;
m_Part = part;
m_PS = ps;
}
~ScannerPairDBInfo(){}
public:
MetaData::DataBlock* m_DB;
BPBinary::BinDataBlock* m_BDB;
MetaData::Part* m_Part;
MetaData::ParameterSet* m_PS;
};
class ScannerPair
{
public:
ScannerPair();
~ScannerPair();
void AddDB(Scanner* sc, MetaData::DataBlock* db, BPBinary::BinDataBlock* bdb, MetaData::Part* part, MetaData::ParameterSet* ps) {
if (!IsContain(sc))return;
if (db->order == 0)
{
if (sc == m_LeftScanner) {
m_LeftZeroSeqDatas.push(new ScannerPairDBInfo(db, bdb, part, ps));
}
else {
m_RightZeroSeqDatas.push(new ScannerPairDBInfo(db, bdb, part, ps));
}
}
else {
if (sc == m_LeftScanner) {
m_LeftDatas.push_back(new ScannerPairDBInfo(db, bdb, part, ps));
}
else {
m_RightDatas.push_back(new ScannerPairDBInfo(db, bdb, part, ps));
}
}
}
void ClearData();
bool IsContain(Scanner* sc) {
if (!sc)return false;
if (sc == m_LeftScanner || sc == m_RightScanner) {
return true;
}
else return false;
}
void BeginWork();
void WaitFinished();
private:
static DWORD WINAPI ScanProc(ScannerPair* _this);
void Scan();
public:
HANDLE m_Thread;
//set<int> m_OrderSet;
list<ScannerPairDBInfo*> m_LeftDatas;
list<ScannerPairDBInfo*> m_RightDatas;
queue<ScannerPairDBInfo*> m_LeftZeroSeqDatas;
queue<ScannerPairDBInfo*> m_RightZeroSeqDatas;
Scanner* m_LeftScanner;
Scanner* m_RightScanner;
};

View File

@ -0,0 +1,245 @@
#include "BaseCtrl.h"
vector<string> BaseCtrl::m_InitErrorInfos;
CRITICAL_SECTION BaseCtrl::m_CS;
bool BaseCtrl::m_IsStart = false;
bool BaseCtrl::m_IsPause = false;
bool BaseCtrl::m_IsStop = false;
bool BaseCtrl::m_IsStandBy = false;
bool BaseCtrl::m_IsFinish = false;
bool BaseCtrl::m_IsPrePrint = false;
bool BaseCtrl::m_IsPauseStanBy = false;
bool BaseCtrl::m_IsHeatingScanner = false;
int BaseCtrl::m_State = 0;
int BaseCtrl::m_PreState = 0;
int BaseCtrl::m_PauseState = 0;
void BaseCtrl::SInit()
{
InitializeCriticalSection(&m_CS);
}
void BaseCtrl::SUninit()
{
DeleteCriticalSection(&m_CS);
}
BaseCtrlState BaseCtrl::GetState() {
BaseCtrlState bcState;
EnterCriticalSection(&m_CS);
bcState.IsStart = m_IsStart;
bcState.IsPause = m_IsPause;
bcState.IsStop = m_IsStop;
bcState.IsStandBy = m_IsStandBy;
bcState.IsFinish = m_IsFinish;
bcState.IsPrePrint = m_IsPrePrint;
bcState.IsPauseStanBy = m_IsPauseStanBy;
bcState.IsHeatingScanner = m_IsHeatingScanner;
bcState.State = m_State;
bcState.PreState = m_PreState;
bcState.PauseState = m_PauseState;
LeaveCriticalSection(&m_CS);
return bcState;
}
void BaseCtrl::UpdateState(const ReadData& rd) {
EnterCriticalSection(&BaseCtrl::m_CS);
if (rd.dataType == SCANCTRLSTATE) {
auto it = rd.its.begin();
while (it != rd.its.end()) {
if (it->nameKey == "IsStart") {
m_IsStart = (bool)stoi(it->strValue);
}
else if (it->nameKey == "IsPause") {
m_IsPause = (bool)stoi(it->strValue);
}
else if (it->nameKey == "IsStop") {
m_IsStop = (bool)stoi(it->strValue);
}
else if (it->nameKey == "IsStandBy") {
m_IsStandBy = (bool)stoi(it->strValue);
}
else if (it->nameKey == "IsFinish") {
m_IsFinish = (bool)stoi(it->strValue);
}
else if (it->nameKey == "IsPrePrint") {
m_IsPrePrint = (bool)stoi(it->strValue);
}
else if (it->nameKey == "IsPauseStanBy") {
m_IsPauseStanBy = (bool)stoi(it->strValue);
}
else if (it->nameKey == "IsHeatingScanner") {
m_IsHeatingScanner = (bool)stoi(it->strValue);
}
else if (it->nameKey == "State") {
m_State = stoi(it->strValue);
}
else if (it->nameKey == "PreState") {
m_PreState = stoi(it->strValue);
}
else if (it->nameKey == "PauseState") {
m_PauseState = stoi(it->strValue);
}
else {
printf("error, key %s do not find...", it->nameKey.c_str());
}
++it;
}
}
LeaveCriticalSection(&BaseCtrl::m_CS);
}
//
//bool BaseCtrl::IsStart()
//{
// bool rel = false;
// EnterCriticalSection(&BaseCtrl::m_CS);
// if (m_print_state == PRINTING) {
// rel = true;
// }
// else rel = false;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return rel;
//}
//
//bool BaseCtrl::IsStandBy()
//{
// bool rel = false;
// EnterCriticalSection(&BaseCtrl::m_CS);
// if (m_print_state == STANDBY || m_print_state == STANDBY_PAUSE || m_print_state == STANDBY_STOP) {
// rel = true;
// }
// else rel = false;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return rel;
//}
//
//bool BaseCtrl::IsPauseStanBy() {
// bool rel = false;
// EnterCriticalSection(&BaseCtrl::m_CS);
// if (m_print_state == STANDBY_PAUSE)rel = true;
// else rel = false;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return rel;
//}
//
//
//bool BaseCtrl::IsPause() {
// bool rel = false;
// EnterCriticalSection(&BaseCtrl::m_CS);
// if (m_print_state == PAUSE) {
// rel = true;
// }
// else rel = false;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return rel;
//}
//
//bool BaseCtrl::IsStop() {
// bool rel = false;
// EnterCriticalSection(&BaseCtrl::m_CS);
// if (m_print_state == STOP)
// {
// rel = true;
// }
// else rel = false;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return rel;
//}
//
//bool BaseCtrl::IsPrePrint() {
// bool rel = false;
// EnterCriticalSection(&BaseCtrl::m_CS);
// if (m_print_state == PREPRINT) {
// rel = true;
// }
// else rel = false;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return rel;
//}
//
//bool BaseCtrl::IsFinish() {
// bool rel = false;
// EnterCriticalSection(&BaseCtrl::m_CS);
// if (m_print_state == FINISH) {
// rel = true;
// }
// else rel = false;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return rel;
//}
//
//void BaseCtrl::SetFinish() {
// EnterCriticalSection(&BaseCtrl::m_CS);
// m_print_state = FINISH;
// LeaveCriticalSection(&BaseCtrl::m_CS);
//}
//
//
//void BaseCtrl::SetStandBy()
//{
// EnterCriticalSection(&BaseCtrl::m_CS);
// m_print_state = STANDBY;
// LeaveCriticalSection(&BaseCtrl::m_CS);
//}
//
//void BaseCtrl::SetPauseState(BaseCtrl::PauseState ps)
//{
// EnterCriticalSection(&BaseCtrl::m_CS);
// m_PauseState = ps;
// LeaveCriticalSection(&BaseCtrl::m_CS);
//}
//
//void BaseCtrl::SetState(PrintState ps)
//{
// EnterCriticalSection(&BaseCtrl::m_CS);
// m_print_state = ps;
// LeaveCriticalSection(&BaseCtrl::m_CS);
//}
//
//void BaseCtrl::SetPreState(BaseCtrl::PreRunState rs)
//{
// EnterCriticalSection(&BaseCtrl::m_CS);
// m_PreRunState = rs;
// LeaveCriticalSection(&BaseCtrl::m_CS);
//}
//
//BaseCtrl::PrintState BaseCtrl::GetState()
//{
// PrintState ps;
// EnterCriticalSection(&BaseCtrl::m_CS);
// ps = m_print_state;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return ps;
//}
//
//BaseCtrl::PreRunState BaseCtrl::GetPreState()
//{
// PreRunState ps;
// EnterCriticalSection(&BaseCtrl::m_CS);
// ps = m_PreRunState;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return ps;
//}
//
//BaseCtrl::PauseState BaseCtrl::GetPauseState()
//{
// PauseState ps;
// EnterCriticalSection(&BaseCtrl::m_CS);
// ps = m_PauseState;
// LeaveCriticalSection(&BaseCtrl::m_CS);
// return ps;
//}
//bool BaseCtrl::IsHeatingScanner()
//{
// if (m_print_state == PREPRINT && m_PreRunState == AutoHeatingScanner) {
// return true;
// }
// else return false;
//}

View File

@ -0,0 +1,134 @@
#pragma once
#include <string>
#include <vector>
#include <windows.h>
//#include "../Job/JobController.h"
#include "../Communication/BaseData.h"
using namespace std;
enum FUNCNAME {
BEGINWORK = 0,
PAUSEWORK,
PAUSEAUTO,
STOPWORK,
STOPREDTEST,
TESTLAYER,
REMOVESCANNER,
STARTHEATINGMOTION,
STOPHEATINGMOTION,
};
struct BaseCtrlState{
bool IsStart;
bool IsPause;
bool IsStop;
bool IsStandBy;
bool IsFinish;
bool IsPrePrint;
bool IsPauseStanBy;
bool IsHeatingScanner;
int State;
int PreState;
int PauseState;
};
class BaseCtrl
{
public:
enum PrintState
{
STANDBY = 0, //就绪
STANDBY_PAUSE, //暂停后就绪
STANDBY_STOP, //停止后就绪
PREPRINT, //打印前准备
PRINTING, //打印中
FINISH, //打印完成
PAUSE, //暂停
STOP //停止
};
enum PreRunState {
NonePre = 0,
CheckIO,
Purifying,
Dedusting,
WaitConfirm,
CancelConfirm,
SummitConfirm,
AutoHeatingScanner,
PreFinished,
};
enum PauseState {
NoPause = 0,
ManualPause,
PrintRestPause,
AlarmPause,
AlarmAutoPause
};
BaseCtrl() {}
virtual ~BaseCtrl() {}
public:
static void SInit();
static void SUninit();
virtual bool Init() = 0;
virtual bool BeginWork() = 0;
virtual bool PauseWork()=0;
virtual bool StopWork()=0;
virtual void ModelScan(int partId, string scanType, float power, float speed) {}
//static PrintState GetState();
//static PreRunState GetPreState();
//static PauseState GetPauseState();
//static void SetPauseState(PauseState ps);
//static void SetState(PrintState ps);
//static void SetPreState(PreRunState rs);
//static void SetStandBy();
//static void SetFinish();
//static bool IsStart();
//static bool IsPause();
//static bool IsStop();
//static bool IsStandBy();
//static bool IsFinish();
//static bool IsPrePrint();
//static bool IsPauseStanBy();
//static bool IsHeatingScanner();
static bool m_IsStart;
static bool m_IsPause;
static bool m_IsStop;
static bool m_IsStandBy;
static bool m_IsFinish;
static bool m_IsPrePrint;
static bool m_IsPauseStanBy;
static bool m_IsHeatingScanner;
static int m_State;
static int m_PreState;
static int m_PauseState;
//void SetJobController(JobController* job_controller);
static BaseCtrlState GetState();
static void UpdateState(const ReadData& rd);
protected:
//JobController* m_job_controller;
static vector<string> m_InitErrorInfos;
private:
//static PrintState m_print_state;
//static PreRunState m_PreRunState;
//static PauseState m_PauseState;
static CRITICAL_SECTION m_CS;
};

View File

@ -3,6 +3,7 @@
#include "../Purifier/XTPurifier.h"
#include "../Purifier/HBD3Purifier.h"
#include "../Purifier/G4Purifier.h"
#include "../ScannerCtrl/BaseCtrl.h"
Controller::Controller()
@ -29,10 +30,12 @@ Controller::~Controller() {
DELP(m_MachineCfg);
SysParam::SFini();
BaseCtrl::SUninit();
}
bool Controller::Init() {
BaseCtrl::SInit();
SysParam::SInit();
m_StateCtrlWrapper = new StateCtrlWrapper();
@ -53,6 +56,10 @@ bool Controller::Init() {
m_ComServer = new ComServer(); //辅机服务
m_ComServer->Init();
//m_ScannerCtrl = new ScannerCtrl();
////m_ScannerCtrl->Init();
//m_ScannerCtrl->SetScannerPowerClient(m_ComServer->m_ScannerPowerClient);
switch (m_MachineCfg->m_PulifierType)
{
case PurifierTypeCfg::XT: {
@ -69,5 +76,6 @@ bool Controller::Init() {
}
m_Purifier->Init();
return true;
}

View File

@ -10,6 +10,7 @@
#include "../Communication/ComServer.h"
#include "../Purifier/BasePurifier.h"
#include "../config/bean/ExtCfg.h"
//#include "../ScannerCtrl/ScannerCtrl.h"
class Machine;
class ComServer;
@ -38,4 +39,6 @@ public:
ComServer* m_ComServer;
BasePurifier* m_Purifier;
//ScannerCtrl* m_ScannerCtrl;
};

View File

@ -29,6 +29,8 @@
#include "../utils/CryptHelper.h"
#include "../utils/ImageHelper.h"
#include "../external/stb/stb_image.h"
#include "../ScannerCtrl/BaseCtrl.h"
UserType g_Admin;
@ -450,7 +452,8 @@ void UIWin::DrawToolBar()
bool isStopAutoPurifier = false;
bool isStartAutoPurifier = false;
if (!show_toolbar) {
ImGui::Image((*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->GetTex(), ImVec2((*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Width, (*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Height));
ImGui::Image((*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->GetTex(),
ImVec2((float)(*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Width, (float)(*m_TextureMap)[ChartletManager::TOOLBAR_RIGHT]->m_Height));
if (ImGui::IsItemHovered())
show_toolbar = true;
}
@ -508,7 +511,7 @@ void UIWin::DrawToolBar()
TextureBean* lightOn = (*m_TextureMap)[ChartletManager::LIGHT_ON];
TextureBean* lightOff = (*m_TextureMap)[ChartletManager::LIGHT_OFF];
//if (!lightCfg->IsActive()) {
if (ImGui::ImageButton(lightOff->GetTex(), ImVec2(lightOff->m_Width, lightOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
if (ImGui::ImageButton(lightOff->GetTex(), ImVec2((float)lightOff->m_Width, (float)lightOff->m_Height), ImVec2(0, 0), ImVec2(1, 1), 0))
{
/*lightCfg->SetActive(true);*/
g_log->TraceInfo(_(u8"开启照明").c_str());
@ -683,7 +686,8 @@ void UIWin::DrawMain()
bool enableFlag = true;
bool exitStopLaserFlag = false;
if (/*m_Controller->m_ScannerCtrl->IsStandBy() ||*/ g_Admin == ADMIN || g_Admin == USER_ADMIN) {
BaseCtrlState scState = BaseCtrl::GetState();
if (scState.IsStandBy || g_Admin == ADMIN || g_Admin == USER_ADMIN) {
enableFlag = true;
}
else {
@ -697,7 +701,7 @@ void UIWin::DrawMain()
{
if (ImGui::BeginMenu(_(u8"系统").c_str()))
{
//ImGui::MenuItem(_(u8"添加任务").c_str(), 0, &m_Controller->m_MenuAssist.isAddTaskClick, m_Controller->m_ScannerCtrl->IsStandBy());
//ImGui::MenuItem(_(u8"添加任务").c_str(), 0, &m_Controller->m_MenuAssist.isAddTaskClick, scState.IsStandBy);
if (ImGui::MenuItem(_(u8"导入参数").c_str()))
{
@ -726,10 +730,10 @@ void UIWin::DrawMain()
}
ImGui::PushItemFlag(ImGuiItemFlags_SelectableDontClosePopup, true);
if (ImGui::MenuItem(_(u8"退出系统").c_str())) {
//if (!m_Controller->m_ScannerCtrl->IsStandBy()) {
// g_Toast->AddToast(new ToastBean(_(u8"正在打印中,请先结束打印后退出").c_str(), 5000));
//}
/*else*/ {
if (!scState.IsStandBy) {
g_Toast->AddToast(new ToastBean(_(u8"正在打印中,请先结束打印后退出").c_str(), 5000));
}
else {
ImGui::OpenPopup(_(u8"退出系统").c_str());
}
}
@ -834,7 +838,7 @@ void UIWin::DrawMain()
if (!ImGui::IsAnyItemActive())
ImGui::SetKeyboardFocusHere();
if (ImGui::InputText(_(u8"密码").c_str(), pwd_buf, sizeof(pwd_buf), ImGuiInputTextFlags_CharsDecimal | ImGuiInputTextFlags_EnterReturnsTrue)) {
g_Admin = SUPER; /*CheckUserPasswd(pwd_buf);*/ //wxxtest
g_Admin = ADMIN; /*CheckUserPasswd(pwd_buf);*/ //wxxtest
std::memset(pwd_buf, 0, sizeof(pwd_buf));
ImGui::CloseCurrentPopup();
}
@ -842,7 +846,7 @@ void UIWin::DrawMain()
if (ImGui::Button(_(u8"确定").c_str(), ImVec2(120, 0)))
{
g_Admin = SUPER; /*CheckUserPasswd(pwd_buf);*/ //wxxtest
g_Admin = ADMIN; /*CheckUserPasswd(pwd_buf);*/ //wxxtest
std::memset(pwd_buf, 0, sizeof(pwd_buf));
ImGui::CloseCurrentPopup();
}
@ -1111,43 +1115,47 @@ void UIWin::DrawMain()
ImGui::SetTooltip(_(u8"锁屏").c_str());
}
ImGui::SameLine();
//if (!BaseCtrl::IsStandBy()) {
// if (ImGui::ImageButton((*m_Controller->m_TextureMap)[ChartletManager::START_ENABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) {
// m_Controller->m_ScannerCtrl->PauseWork();
// }
// if (ImGui::IsItemHovered()) {
// ImGui::SetTooltip(_(u8"暂停").c_str());
// }
//}
//else if (BaseCtrl::GetState() == BaseCtrl::STANDBY || BaseCtrl::GetState() == BaseCtrl::STANDBY_STOP) {
// if (ImGui::ImageButton((*m_Controller->m_TextureMap)[ChartletManager::START_DISABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0))
// {
// m_Controller->m_ScannerCtrl->BeginWork();
// }
// if (ImGui::IsItemHovered()) {
// ImGui::SetTooltip(_(u8"开始").c_str());
// }
//}
//else {
// if (ImGui::ImageButton((*m_Controller->m_TextureMap)[ChartletManager::PAUSE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0))
// {
// m_Controller->m_ScannerCtrl->BeginWork();
// }
// if (ImGui::IsItemHovered()) {
// ImGui::SetTooltip(_(u8"继续").c_str());
// }
//}
if (!scState.IsStandBy) {
if (ImGui::ImageButton((*m_TextureMap)[ChartletManager::START_ENABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0)) {
//m_Controller->m_ScannerCtrl->PauseWork();
DataHandle::Instance()->SetPushMsg(SCANCTRLFUNC,to_string(PAUSEWORK));
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"暂停").c_str());
}
}
else if (scState.State == BaseCtrl::STANDBY || scState.State == BaseCtrl::STANDBY_STOP) {
if (ImGui::ImageButton((*m_TextureMap)[ChartletManager::START_DISABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0))
{
//m_Controller->m_ScannerCtrl->BeginWork();
DataHandle::Instance()->SetPushMsg(SCANCTRLFUNC, to_string(BEGINWORK));
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"开始").c_str());
}
}
else {
if (ImGui::ImageButton((*m_TextureMap)[ChartletManager::PAUSE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0))
{
//m_Controller->m_ScannerCtrl->BeginWork();
DataHandle::Instance()->SetPushMsg(SCANCTRLFUNC, to_string(BEGINWORK));
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"继续").c_str());
}
}
ImGui::SameLine();
//if (BaseCtrl::IsStop() || BaseCtrl::GetState() == BaseCtrl::STANDBY_STOP) {
// ImGui::ImageButton((*m_Controller->m_TextureMap)[ChartletManager::STOP_ENABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0);
//}
//else{
// if (ImGui::ImageButton((*m_Controller->m_TextureMap)[ChartletManager::STOP_DISABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0))
// {
// m_Controller->m_ScannerCtrl->StopWork();
// }
//}
if (scState.IsStop || scState.State == BaseCtrl::STANDBY_STOP) {
ImGui::ImageButton((*m_TextureMap)[ChartletManager::STOP_ENABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0);
}
else{
if (ImGui::ImageButton((*m_TextureMap)[ChartletManager::STOP_DISABLE]->GetTex(), ImVec2(60, 60), ImVec2(0, 0), ImVec2(1, 1), 0))
{
//m_Controller->m_ScannerCtrl->StopWork();
DataHandle::Instance()->SetPushMsg(SCANCTRLFUNC, to_string(STOPWORK));
}
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_(u8"结束").c_str());
}
@ -1691,7 +1699,8 @@ void UIWin::DrawMain()
// }
// ImGui::CloseCurrentPopup();
// m_Controller->m_ScannerCtrl->TestLayer();
////m_Controller->m_ScannerCtrl->TestLayer();
//DataHandle::Instance()->SetPushMsg(SCANCTRLFUNC, to_string(TESTLAYER));
// g_log->TraceInfo(_(u8"执行红光测试").c_str());
// }
// }
@ -1825,15 +1834,16 @@ void UIWin::DrawMain()
void UIWin::DrawIO()
{
if (!m_IOWinShow)return;
//if (!m_UIController.m_ScannerCtrl->IsStandBy() && g_Admin == USER)return;
BaseCtrlState bcState = BaseCtrl::GetState();
if (!bcState.IsStandBy && g_Admin == USER)return;
m_Controller->m_Machine->DrawIO(&m_IOWinShow);
}
void UIWin::DrawPowder(){
if (!m_powderWinShow)return;
//if (!m_Controller->m_ScannerCtrl->IsStandBy() && g_Admin == USER)return;
BaseCtrlState bcState = BaseCtrl::GetState();
if (!bcState.IsStandBy && g_Admin == USER)return;
m_Controller->m_Machine->DrawPowderCtrl(&m_powderWinShow);
}

View File

@ -35,10 +35,20 @@ Size=264,102
Collapsed=0
[Window][铺粉装置调试]
Pos=128,19
Pos=111,36
Size=1236,722
Collapsed=0
[Window][开启一键除氧确定]
Pos=671,388
Size=193,88
Collapsed=0
[Window][退出系统]
Pos=636,384
Size=264,96
Collapsed=0
[Docking][Data]
DockSpace ID=0x0204CCDD Window=0xDEDC5B90 Pos=0,40 Size=1536,779 Split=X
DockNode ID=0x00000001 Parent=0x0204CCDD SizeRef=1178,779 CentralNode=1

Binary file not shown.

View File

@ -475,10 +475,10 @@ void ConfigManager::UpdateCfg(const ReadData& rd) {
switch (rd.dataType)
{
case PARAMLIMITCFG:
m_ParamLimitCfgNew.Update(rd);
m_ParamLimitCfgNew.Update(rd, PARAMLIMITCFGPARAM);
m_ParamLimitCfgNew.UpdateCfg(m_ParamLimitCfg);
case EXTCFG:
m_ExtCfgNew.Update(rd);
m_ExtCfgNew.Update(rd, EXTCFGPARAM);
m_ExtCfgNew.UpdateCfg(m_ExtCfg);
default:
break;

View File

@ -13,6 +13,7 @@ using namespace std;
#define GTS_AXIS_ID_CLEAN 5
#define GTS_AXIS_ID_ELE 6
#pragma pack(1)
class AxisCfg : public Base
{
public:
@ -70,5 +71,5 @@ public:
char m_endFlag;
};
#pragma pack()

View File

@ -844,7 +844,7 @@ ExtCfgNew::ExtCfgNew()
void ExtCfgNew::UpdateCfg(ExtCfg& cfg) {
std::unique_lock<std::shared_mutex> lock(m_mtx);
std::shared_lock<std::shared_mutex> lock(m_mtx);
cfg.m_SelectedFanWindFit = m_SelectedFanWindFit->GetValue();
cfg.m_ComGetOxygen = m_ComGetOxygen->GetValue();

View File

@ -623,7 +623,7 @@ ParamLimitCfgNew::~ParamLimitCfgNew() {
void ParamLimitCfgNew::UpdateCfg(ParamLimitCfg& cfg) {
std::unique_lock<std::shared_mutex> lock(m_mtx);
std::shared_lock<std::shared_mutex> lock(m_mtx);
cfg.m_ScanSpeedMin = m_ScanSpeedMin->GetValue();
cfg.m_ScanSpeedMax = m_ScanSpeedMax->GetValue();
cfg.m_ScanPowerMin = m_ScanPowerMin->GetValue();

View File

@ -155,7 +155,7 @@ public:
};
#pragma pack(1)
class ParamLimitCfgNew :public Base {
public:
ParamLimitCfgNew();
@ -237,3 +237,4 @@ private:
char m_endFlag;
};
#pragma pack()

View File

@ -39,7 +39,7 @@ public:
void SendToClients(WRITETYPE type, const std::string& addKey = "") {
std::list<Item> its;
{
std::unique_lock<std::shared_mutex> lock(m_mtx);
std::shared_lock<std::shared_mutex> lock(m_mtx); //读锁
auto baseItem = m_baseMp.begin();
while (baseItem != m_baseMp.end()) {
std::string tempKey(baseItem->first + addKey);
@ -51,9 +51,10 @@ public:
}
void Update(const ReadData& rd) {
std::unique_lock<std::shared_mutex> lock(m_mtx);
void Update(const ReadData& rd, WRITETYPE type) {
if (m_baseMp.find(rd.nameKey) != m_baseMp.end()) {
std::unique_lock<std::shared_mutex> lock(m_mtx);
if (rd.valueType == iBOOL) {
m_baseMp[rd.nameKey]->SetValue((bool)stoi(rd.strValue));
}
@ -80,6 +81,7 @@ public:
printf("error, %s do not find...", rd.nameKey.c_str());
}
SendToClients(type); //客户端更新后在发送给客户端
}

View File

@ -39,6 +39,7 @@ Controller::~Controller() {
DELP(m_Purifier);
BaseCtrl::SUninit();
}
@ -48,11 +49,7 @@ void Controller::Init(){
BaseCtrl::SInit();
m_jobController.SInit();
m_SysParamWrapper = new SysParamWrapper;
m_StateCtrlWrapper = new StateCtrlWrapper;
m_StateCtrlWrapper->Init(m_CoreCommunication);
m_AxisRecordWrapper = new AxisRecordWrapper;
m_AxisRecordWrapper->Init(m_CoreCommunication);
m_CoreCommunication = new CoreCommunication();
m_CoreCommunication->SetIOCfgWrapper(ConfigManager::GetInstance()->GetIoCfgWrapper());
@ -63,6 +60,12 @@ void Controller::Init(){
m_CoreCommunication->Init();
m_CoreCommunication->Startup();
m_SysParamWrapper = new SysParamWrapper;
m_StateCtrlWrapper = new StateCtrlWrapper;
m_StateCtrlWrapper->Init(m_CoreCommunication);
m_AxisRecordWrapper = new AxisRecordWrapper;
m_AxisRecordWrapper->Init(m_CoreCommunication);
m_SignalStateWrapper = new SignalStateWrapper();
m_Machine = ConfigManager::GetInstance()->GetMachine();
m_Machine->InitSignal(m_SignalStateWrapper, m_CoreCommunication);
@ -115,10 +118,10 @@ void Controller::Init(){
m_jobController.StartLoadPrepareJob();
//发送配置到客户端
ConfigManager::GetInstance()->SendCfgToClients();
}
ConfigManager::GetInstance()->SendCfgToClients(); //发送配置到客户端
BaseCtrl::SendToClients(); //发送控制参数到客户端
}
void Controller::StartSend() {
@ -129,7 +132,7 @@ void Controller::StartSend() {
while (!m_sendTdExitFlag) {
m_ComServer->SendToClients();
m_Purifier->SendToClients();
ConfigManager::GetInstance()->GetMachine()->SendToClients(LOADPARAMRSP);
//ConfigManager::GetInstance()->GetMachine()->SendToClients(LOADPARAMRSP);
this_thread::sleep_for(std::chrono::milliseconds(100));
}

View File

@ -219,12 +219,14 @@ void DataHandle::DataCallBackHandle(const ReadData& msg) {
m_controller->m_ComServer->m_PowerMeterClient->ResetElec(); break;
case PURIFIERPARAMW:
m_controller->m_Purifier->SetParam(msg); break;
case SETZEROPOS:
ConfigManager::GetInstance()->UpdateZeroOffset(stoi(msg.nameKey), stof(msg.strValue)); break;
case AXISSTOPALL:
m_controller->m_Axis->StopAll(); break;
case READTYPE::LOADPARAM:
m_controller->m_Machine->Update(msg); break;
case SETZEROPOS:
ConfigManager::GetInstance()->UpdateZeroOffset(stoi(msg.nameKey), stof(msg.strValue)); break;
case AXISSTOPALL:
m_controller->m_Axis->StopAll(); break;
case READTYPE::LOADPARAM:
m_controller->m_Machine->Update(msg,LOADPARAMRSP); break;
case READTYPE::SCANCTRLFUNC:
m_controller->m_ScannerCtrl->CallFunc(msg); break;
default: break;

View File

@ -46,14 +46,21 @@ enum READTYPE {
IOSIGNAL, //io 信号
RESETELEC, //PowerMeterClient
PURIFIERPARAMW, //净化器参数写入
LAYERDATAREQ, //layer数据请求
SETZEROPOS, //AxisState使用
AXISSTOPALL, //axis 运动急停
/********************配置信息******************/
PARAMLIMITCFG,
EXTCFG,
LOADPARAM, //装载参数
/********************振镜控制******************/
SCANCTRLFUNC, //振镜控制函数
};
enum DATATYPE {
@ -127,8 +134,8 @@ enum WRITETYPE {
POWDERSUPPLYSIMPLEPARAM, //
SCANNERPOWERPARAM, //ScannerPower 参数
SETZEROPOS, //AxisState使用
AXISSTOPALL, //axis 运动急停
//SETZEROPOS, //AxisState使用
//AXISSTOPALL, //axis 运动急停
/********************配置信息******************/
PARAMLIMITCFGPARAM,
@ -143,6 +150,7 @@ enum WRITETYPE {
LOADPARAMRSP, //装载参数
SCANCTRLSTATE, //scanctrl参数
};

View File

@ -31,6 +31,7 @@ Machine::Machine(MachineTypeCfg::MachineTypeId type)
, m_isLoadOut(new BoolData("IsLoadOut",u8"是否载出"))
, m_NeedWaitSelectOutPos(new BoolData("NeedWaitSelectOutPos"))
, m_WaitSelectOutPosCommit(new BoolData("WaitSelectOutPosCommit"))
, m_SelectOutPos(new IntData("SelectOutPos"))
{
InsertMp(&m_LoadInfo, 1);
InsertMp(&m_LoadInProcStep, 1);
@ -81,7 +82,7 @@ Machine::Machine(MachineTypeCfg::MachineTypeId type)
m_CommunicationEnableMap["OXYGEN"] = true;
m_SSRCheckTick = GetTickCount64();
InitializeCriticalSection(&m_LoadCS);
//InitializeCriticalSection(&m_LoadCS);
}
Machine::~Machine() {

View File

@ -152,21 +152,28 @@ protected:
virtual void LoadInRun() = 0;
void SetLoadInResult(int res,string info) {
EnterCriticalSection(&m_LoadCS);
m_LoadInResut->SetValue( res);
m_LoadInfo ->SetValue( info);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_LoadInResut->SetValue(res);
m_LoadInfo->SetValue(info);
}
SendToClients(LOADPARAMRSP);
}
void SetLoadOutResult(int res,string info) {
EnterCriticalSection(&m_LoadCS);
m_LoadOutResut->SetValue(res);
m_LoadInfo->SetValue(info);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_LoadOutResut->SetValue(res);
m_LoadInfo->SetValue(info);
}
SendToClients(LOADPARAMRSP);
}
bool GetMachineParam(MACHINEPARAM& mp) {
EnterCriticalSection(&m_LoadCS);
//EnterCriticalSection(&m_LoadCS);
std::shared_lock<std::shared_mutex> lock(m_mtx); // 获取读锁(共享锁)
mp.m_LoadInResut = m_LoadInResut->GetValue();
mp.m_LoadInfo = m_LoadInfo->GetValueStr();
mp.m_LoadOutResut = m_LoadOutResut->GetValue();
@ -179,55 +186,79 @@ protected:
mp.m_WaitSelectOutPosCommit = m_WaitSelectOutPosCommit->GetValue();
mp.m_SelectOutPos = m_SelectOutPos->GetValue();
LeaveCriticalSection(&m_LoadCS);
//LeaveCriticalSection(&m_LoadCS);
return true;
}
void SetLoadInProcStep(int res) {
EnterCriticalSection(&m_LoadCS);
m_LoadInProcStep->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_LoadInProcStep->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
void SetLoadOutProcStep(int res) {
EnterCriticalSection(&m_LoadCS);
m_LoadOutProcStep->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_LoadOutProcStep->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
void SetIsLoadIn(bool res) {
EnterCriticalSection(&m_LoadCS);
m_isLoadIn->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_isLoadIn->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
void SetIsLoadOut(bool res) {
EnterCriticalSection(&m_LoadCS);
m_isLoadOut->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_isLoadOut->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
void SetWaitConnectBoxCommit(bool res) {
EnterCriticalSection(&m_LoadCS);
m_WaitConnectBoxCommit->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_WaitConnectBoxCommit->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
void SetNeedWaitSelectOutPos(bool res) {
EnterCriticalSection(&m_LoadCS);
m_NeedWaitSelectOutPos->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_NeedWaitSelectOutPos->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
void SetWaitSelectOutPosCommit(bool res) {
EnterCriticalSection(&m_LoadCS);
m_WaitSelectOutPosCommit->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_WaitSelectOutPosCommit->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
void SetSelectOutPos(int res) {
EnterCriticalSection(&m_LoadCS);
m_SelectOutPos->SetValue(res);
LeaveCriticalSection(&m_LoadCS);
{
std::unique_lock<std::shared_mutex> lock(m_mtx); // 获取写锁
m_SelectOutPos->SetValue(res);
}
SendToClients(LOADPARAMRSP);
}
@ -284,7 +315,7 @@ protected:
IntData* m_SelectOutPos;
CRITICAL_SECTION m_LoadCS;
//CRITICAL_SECTION m_LoadCS;
vector<string> m_AxisTabs;
};

View File

@ -1,5 +1,13 @@
#include "BaseCtrl.h"
#include <vector>
#include "../DataManage/ClientInfo.h"
BaseCtrl::PrintState BaseCtrl::m_print_state = STANDBY;
BaseCtrl::PreRunState BaseCtrl::m_PreRunState = NonePre;
vector<string> BaseCtrl::m_InitErrorInfos;
BaseCtrl::PauseState BaseCtrl::m_PauseState = ManualPause;
CRITICAL_SECTION BaseCtrl::m_CS;
BaseCtrl::BaseCtrl()
{
@ -107,6 +115,8 @@ void BaseCtrl::SetFinish() {
EnterCriticalSection(&BaseCtrl::m_CS);
m_print_state = FINISH;
LeaveCriticalSection(&BaseCtrl::m_CS);
SendToClients();
}
@ -115,6 +125,8 @@ void BaseCtrl::SetStandBy()
EnterCriticalSection(&BaseCtrl::m_CS);
m_print_state = STANDBY;
LeaveCriticalSection(&BaseCtrl::m_CS);
SendToClients();
}
void BaseCtrl::SetPauseState(BaseCtrl::PauseState ps)
@ -122,6 +134,8 @@ void BaseCtrl::SetPauseState(BaseCtrl::PauseState ps)
EnterCriticalSection(&BaseCtrl::m_CS);
m_PauseState = ps;
LeaveCriticalSection(&BaseCtrl::m_CS);
SendToClients();
}
void BaseCtrl::SetState(PrintState ps)
@ -129,6 +143,8 @@ void BaseCtrl::SetState(PrintState ps)
EnterCriticalSection(&BaseCtrl::m_CS);
m_print_state = ps;
LeaveCriticalSection(&BaseCtrl::m_CS);
SendToClients();
}
void BaseCtrl::SetPreState(BaseCtrl::PreRunState rs)
@ -136,6 +152,8 @@ void BaseCtrl::SetPreState(BaseCtrl::PreRunState rs)
EnterCriticalSection(&BaseCtrl::m_CS);
m_PreRunState = rs;
LeaveCriticalSection(&BaseCtrl::m_CS);
SendToClients();
}
BaseCtrl::PrintState BaseCtrl::GetState()
@ -173,8 +191,22 @@ bool BaseCtrl::IsHeatingScanner()
else return false;
}
BaseCtrl::PrintState BaseCtrl::m_print_state = STANDBY;
BaseCtrl::PreRunState BaseCtrl::m_PreRunState = NonePre;
vector<string> BaseCtrl::m_InitErrorInfos;
BaseCtrl::PauseState BaseCtrl::m_PauseState = ManualPause;
CRITICAL_SECTION BaseCtrl::m_CS;
void BaseCtrl::SendToClients() {
list<Item> its;
its.emplace_back(Item{"IsStart",to_string(IsStart()), iBOOL});
its.emplace_back(Item{"IsPause",to_string(IsPause()), iBOOL});
its.emplace_back(Item{"IsStop",to_string(IsStop()), iBOOL});
its.emplace_back(Item{"IsStandBy",to_string(IsStandBy()), iBOOL});
its.emplace_back(Item{"IsFinish",to_string(IsFinish()), iBOOL});
its.emplace_back(Item{"IsPrePrint",to_string(IsPrePrint()), iBOOL});
its.emplace_back(Item{"IsPauseStanBy",to_string(IsPauseStanBy()), iBOOL});
its.emplace_back(Item{"IsHeatingScanner",to_string(IsHeatingScanner()), iBOOL});
its.emplace_back(Item{"State",to_string(GetState()), iBOOL});
its.emplace_back(Item{"PreState",to_string(GetPreState()), iBOOL});
its.emplace_back(Item{"PauseState",to_string(GetPauseState()), iBOOL});
ClientWrapper::Instance()->PushAllClient(WriteData(SCANCTRLSTATE, its));
}

View File

@ -73,6 +73,7 @@ public:
static bool IsPrePrint();
static bool IsPauseStanBy();
static bool IsHeatingScanner();
static void SendToClients();
void SetJobController(JobController* job_controller);

View File

@ -1744,4 +1744,44 @@ void ScannerCtrl::RemoveScanner(int seq)
// }
// ImGui::EndPopup();
// }
//}
//}
void ScannerCtrl::CallFunc(const ReadData& rd) {
FUNCNAME func = (FUNCNAME)stoi(rd.nameKey);
switch (func) {
case BEGINWORK:
BeginWork();
break;
case PAUSEWORK:
PauseWork();
break;
case PAUSEAUTO:
PauseAuto();
break;
case STOPWORK:
StopWork();
break;
case STOPREDTEST:
StopRedTest();
break;
case TESTLAYER:
TestLayer();
break;
case REMOVESCANNER:
RemoveScanner(stoi(rd.strValue));
break;
case STARTHEATINGMOTION:
StartHeatingMotion();
break;
case STOPHEATINGMOTION:
StopHeatingMotion((bool)stoi(rd.strValue));
break;
default:
printf("参数不对...\n");
break;
}
}

View File

@ -11,14 +11,25 @@
#include "ScannerPair.h"
#include "../Communication/ScannerPowerClient.h"
enum FUNCNAME {
BEGINWORK = 0,
PAUSEWORK,
PAUSEAUTO,
STOPWORK,
STOPREDTEST,
TESTLAYER,
REMOVESCANNER,
STARTHEATINGMOTION,
STOPHEATINGMOTION,
};
class RemoteClient;
class ScannerCtrl : public BaseCtrl
{
typedef ScannerCtrl thisClass;
public:
ScannerCtrl();
~ScannerCtrl();
bool Init();
@ -28,7 +39,7 @@ public:
void PauseAuto();
bool StopWork();
bool IsTestLayerEnable();
bool IsTestLayerEnable(); //留着
void StopRedTest();
void TestLayer();
vector<Scanner*>* GetScanners() { return &m_scan; }
@ -59,7 +70,8 @@ public:
void StopHeatingMotion(bool iswait);
void SetRemoteClient(RemoteClient* rc) { m_RemoteClient = rc; }
void DrawFinishReport();
void CallFunc(const ReadData& rd);
private:
static DWORD WINAPI PrintProc(thisClass* _this);
static DWORD WINAPI RedPrintTestProc(thisClass* _this);

Binary file not shown.

View File

@ -21,5 +21,6 @@ ArmBackLimit
SendToClients 需要修改
配置信息参数是否只在客户端修改
辅机 净化器发送接收客户端数据,其他的基本不用从客户端更新数据