Merge
This commit is contained in:
@@ -30,3 +30,5 @@ PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/Release/
|
||||
PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/Debug/
|
||||
PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/ReleaseSO7/
|
||||
PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/ReleaseSO7/
|
||||
PcDmis/Base/Interfac/Msi/Hsi/KeyenceTM065/LKIF_Multi_USÓ¢ÕZ°æ
|
||||
PcDmis/Base/Interfac/Msi/Hsi/KeyenceTM065/LK-GͨÐÅÓÃDLL-20090427
|
||||
|
||||
@@ -19,9 +19,10 @@ using namespace INTEGMOTORINTERFACELib;
|
||||
|
||||
#define MAX_BUFF_SIZE 0x200
|
||||
|
||||
#undef THREAD_RUNNING_STATE
|
||||
#define THREAD_RUNNING_STATE 0
|
||||
#define THREAD_PAUSED 1
|
||||
#define THREAD_EXIT -1
|
||||
#define THREAD_PAUSED 1
|
||||
#define THREAD_EXIT -1
|
||||
#define HBIT0 0X0001
|
||||
#define HBIT1 0X0002
|
||||
#define HBIT2 0X0004
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// Keyence Status class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_KEYENCE_STATUS_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_)
|
||||
#define AFX_KEYENCE_STATUS_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
enum KEYENCE_STATUS {
|
||||
KEYENCE_STATUS_NORMAL = 0,
|
||||
KEYENCE_STATUS_DATALINK_ERROR,
|
||||
KEYENCE_STATUS_SETUP_ASYNC_CONTEXT_ERROR,
|
||||
KEYENCE_STATUS_COMMAND_TIMEOUT,
|
||||
KEYENCE_STATUS_COMMAND_BUSY,
|
||||
KEYENCE_STATUS_REPLAY_FILE_ERROR,
|
||||
KEYENCE_STATUS_CONFIG_FILE_NOT_FOUND,
|
||||
KEYENCE_ERROR
|
||||
};
|
||||
#endif // !defined(AFX_KEYENCE_STATUS_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_)
|
||||
@@ -0,0 +1,307 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Tools\UsbUtility\Proto_Util.h"
|
||||
#include "KeyenceTM065_Proto.h"
|
||||
#include "KeyenceStatus.h"
|
||||
|
||||
#define MY_CONFIG 1
|
||||
#define MAX_DEVPATH_LENGTH 256
|
||||
#define ENDPOINT_TIMEOUT 500
|
||||
|
||||
//******************************************************************************
|
||||
//
|
||||
void CKeyenceTM065_Proto::_process_rcv_transfer_data()
|
||||
{
|
||||
switch (ep_buff._cmd0)
|
||||
{
|
||||
case _CMD0_0800:
|
||||
break;
|
||||
case _CMD0_0C00:
|
||||
switch (ep_buff._cmd1)
|
||||
{
|
||||
case _CMD1_0730:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
case _CMD0_100a:
|
||||
break;
|
||||
case _CMD0_1400:
|
||||
break;
|
||||
case _CMD0_3000:
|
||||
break;
|
||||
case _CMD0_4800:
|
||||
break;
|
||||
case _CMD0_4c00:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
_process_KEYENCE_CMD_GET_DATA();
|
||||
};
|
||||
|
||||
//******************************************************************************
|
||||
CKeyenceTM065_Proto::CKeyenceTM065_Proto()
|
||||
{
|
||||
ep_buff._buff = (unsigned char *)malloc(MAX_KEYENCE_EP_BUFF_SIZE);
|
||||
ep_buff._bin = (unsigned char *)malloc(MAX_KEYENCE_EP_BUFF_SIZE);
|
||||
ep_buff._send_size = 0;
|
||||
ep_buff._async_context = NULL;
|
||||
ep_buff._cmd0 = 0;
|
||||
ep_buff._cmd1 = 0;
|
||||
g_dev = NULL;
|
||||
};
|
||||
|
||||
//******************************************************************************
|
||||
CKeyenceTM065_Proto::~CKeyenceTM065_Proto()
|
||||
{
|
||||
free(ep_buff._buff);
|
||||
free(ep_buff._bin);
|
||||
}
|
||||
|
||||
#pragma warning(disable:4996)
|
||||
//******************************************************************************
|
||||
|
||||
//******************************************************************************
|
||||
usb_dev_handle* CKeyenceTM065_Proto::_open_usb_dev(void)
|
||||
{
|
||||
struct usb_bus *bus = NULL;
|
||||
struct usb_device *dev = NULL;
|
||||
|
||||
for (bus = usb_get_busses(); bus; bus = bus->next)
|
||||
{
|
||||
for (dev = bus->devices; dev; dev = dev->next)
|
||||
{
|
||||
if (dev->descriptor.idVendor == KEYENCE_VID && dev->descriptor.idProduct == KEYENCE_PID)
|
||||
{
|
||||
return usb_open(dev);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
int CKeyenceTM065_Proto::_usb_reset(void)
|
||||
{
|
||||
if (g_dev)
|
||||
{
|
||||
usb_reset(g_dev);
|
||||
g_dev = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(0);
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
int CKeyenceTM065_Proto::Init_Keyence()
|
||||
{
|
||||
int usb_status = NULL;
|
||||
usb_init(); // initialize the library
|
||||
usb_status = usb_find_busses(); // find all busses
|
||||
usb_status = usb_find_devices(); // find all connected devices
|
||||
g_dev = _open_usb_dev();
|
||||
if (!g_dev)
|
||||
{
|
||||
MessageBox(NULL, _T("Unable to open device"), _T("Message"), MB_OK);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
|
||||
if (usb_set_configuration(g_dev, MY_CONFIG) < 0)
|
||||
{
|
||||
MessageBox(NULL, _T("Unable to SET CONFIGURATION"), _T("Message"), MB_OK);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
|
||||
if (usb_claim_interface(g_dev, 0) < 0)
|
||||
{
|
||||
usb_close(g_dev);
|
||||
MessageBox(NULL, _T("Unable to CLAIM DEVICE"), _T("Message"), MB_OK);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
int CKeyenceTM065_Proto::Exit_Keyence()
|
||||
{
|
||||
if (g_dev)
|
||||
{
|
||||
usb_release_interface(g_dev,0);
|
||||
usb_close(g_dev);
|
||||
g_dev = NULL;
|
||||
}
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
// This startup just kicks off the EP_KEYENCE_81 worker thread.
|
||||
//******************************************************************************
|
||||
int CKeyenceTM065_Proto::_start_machine()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//===============================================================================
|
||||
int CKeyenceTM065_Proto::_shutdown_machine()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//===============================================================================
|
||||
// Keyence Protocol - This can be processed serially.
|
||||
// Send data on EP_01 channel.
|
||||
// Receive data on EP_01.
|
||||
// Send data on EP_82 channel.
|
||||
// Receive data on EP_82 channel.
|
||||
// if more data needs to be received, send data to EP_82 channel.
|
||||
// (Note, we do not receive Image Data, so we will not receive 0x40000 bytes.
|
||||
// But we must make provision for receiving and sending 0x40000 bytes. (512x512).
|
||||
//
|
||||
// The following two commands is all we need:
|
||||
//
|
||||
// usb_bulk_write(g_dev, iEP, (char *)(ep_buff._buff+33), ep_buff._send_size, 5000);
|
||||
// iRcvSize = usb_bulk_read(g_dev, iEP, (char *)ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, 5000);
|
||||
//
|
||||
//===============================================================================
|
||||
int CKeyenceTM065_Proto::_send_usb_data()
|
||||
{
|
||||
int _ret;
|
||||
_ret = usb_bulk_setup_async(g_dev, &ep_buff._async_context, ep_buff._iEP);
|
||||
if (_ret < 0)
|
||||
{
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
_ret = usb_submit_async(ep_buff._async_context, (char *)ep_buff._bin, ep_buff._send_size);
|
||||
if (_ret < 0)
|
||||
{
|
||||
usb_free_async(&ep_buff._async_context);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
_ret = usb_reap_async(ep_buff._async_context, 10000);
|
||||
if (_ret > 0)
|
||||
{
|
||||
ep_buff._recv_size = _ret;
|
||||
_process_rcv_transfer_data();
|
||||
usb_free_async(&ep_buff._async_context);
|
||||
}
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_send_cmd_KEYENCE_CMD_GET_DATA()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_process_KEYENCE_CMD_GET_DATA()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_get_image()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_put_program()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_init_program()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_get_program()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_read_env()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_write_env()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_set_config() // sets trigger etc.
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
//
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_replay_capture(CString s_replay_file)
|
||||
{
|
||||
//struct_ep ep_buff;
|
||||
//ep_buff._buff = (unsigned char *)malloc(MAX_KEYENCE_EP_BUFF_SIZE);
|
||||
//ep_buff._bin = (unsigned char *)malloc(MAX_KEYENCE_EP_BUFF_SIZE);
|
||||
char cTemp[9];
|
||||
FILE* pInFile;
|
||||
_wfopen_s(&pInFile, s_replay_file, _T("r"));
|
||||
if (pInFile == NULL)
|
||||
{
|
||||
return KEYENCE_STATUS_REPLAY_FILE_ERROR;
|
||||
};
|
||||
fgets((char *)ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, pInFile ); // pick up the first line
|
||||
TRACE("\nReading1 %s", ep_buff._buff);
|
||||
CProto_Util* _protoUtil = new CProto_Util();
|
||||
while (!feof(pInFile))
|
||||
{
|
||||
memset(cTemp, 0 , 9);
|
||||
memcpy(cTemp, ep_buff._buff+24, 8);
|
||||
sscanf_s(cTemp, "%8x", &ep_buff._send_size); // get the length of the transmission
|
||||
ep_buff._recv_size = ep_buff._send_size;
|
||||
memcpy(cTemp, ep_buff._buff+33, 8);
|
||||
sscanf_s(cTemp, "%8x", &ep_buff._cmd0);
|
||||
ep_buff._iEP = (*(ep_buff._buff+21) == '1') ? 0x01:0x82;
|
||||
if (*ep_buff._buff == '>')
|
||||
{
|
||||
if (ep_buff._iEP == 0x82)
|
||||
memset(ep_buff._bin, ep_buff._send_size, 0);
|
||||
else
|
||||
{
|
||||
_protoUtil->_char2bin(ep_buff._buff+33, ep_buff._bin, ep_buff._send_size);
|
||||
if (ep_buff._send_size == 0x200) // Temporary patch to see how Keyence behaves.
|
||||
{
|
||||
memset(ep_buff._bin+12, 0, 0x200);
|
||||
}
|
||||
};
|
||||
_send_usb_data();
|
||||
fgets((char *)ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, pInFile ); // skip the input line
|
||||
}
|
||||
fgets((char *)ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, pInFile ); // pick up the first line
|
||||
Sleep(50);
|
||||
};
|
||||
delete _protoUtil;
|
||||
fclose(pInFile);
|
||||
//free(ep_buff._buff);
|
||||
//free(ep_buff._bin);
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//==============================================================
|
||||
//
|
||||
//==============================================================
|
||||
int CKeyenceTM065_Proto::_read_prs_file(CString cFileName)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(cFileName);
|
||||
return 0;
|
||||
};
|
||||
@@ -0,0 +1,213 @@
|
||||
// protocol for control SevenOcean's Machine
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#ifndef AFX_KEYENCE_Proto_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
#define AFX_KEYENCE_Proto_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Include\lusb0_usb.h"
|
||||
#include "..\KeyenceTM065\KeyenceStatus.h"
|
||||
|
||||
#define _CMD0_0800 0x08000000
|
||||
#define _CMD0_0C00 0x0c000000 // -> 0704 Reply 0800 0705
|
||||
// -> 0710 Reply 0c00 0711
|
||||
// -> 071a Reply 8400 071b
|
||||
|
||||
#define _CMD0_100a 0x100a0000 // -> 0730 Reply 0c00 0731
|
||||
#define _CMD0_1400 0x14000000 // ???? Send 4 bytes 1400,
|
||||
// then send 200 bytes
|
||||
// Request 40000 bytes image
|
||||
#define _CMD0_3000 0x30000000 // -> 0730 Reply 0c00 0731
|
||||
#define _CMD0_4800 0x48000000 // -> 0730 Reply 0c00 0731
|
||||
#define _CMD0_4c00 0x4c000000 // -> 0730 Reply 0c00 0731
|
||||
|
||||
#define _CMD1_0730 0x07300000
|
||||
#define _CMD1_0731 0x07310000
|
||||
|
||||
#define MAX_KEYENCE_EP_BUFF_SIZE 0X40000
|
||||
|
||||
#define USB_ENDPOINT_TYPE_CONTROL 0
|
||||
#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1
|
||||
#define USB_ENDPOINT_TYPE_BULK 2
|
||||
#define USB_ENDPOINT_TYPE_INTERRUPT 3
|
||||
|
||||
#define USB_DEVICE_DESCRIPTOR_TYPE 1
|
||||
#define USB_CONFIGURATION_DESCRIPTOR_TYPE 2
|
||||
|
||||
// Device configuration and interface id.
|
||||
#define KEYENCE_USB_CONFIG 1
|
||||
#define KEYENCE_USB_INTF 0
|
||||
|
||||
#define EP_KEYENCE_01 0x01
|
||||
#define EP_KEYENCE_82 0x82
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
#define KEYENCE_VID 0x0720
|
||||
#define KEYENCE_PID 0x0015
|
||||
|
||||
struct struct_ep
|
||||
{
|
||||
unsigned char _iEP;
|
||||
unsigned char *_buff;
|
||||
BYTE *_bin;
|
||||
int _cmd0;
|
||||
int _cmd1;
|
||||
int _send_size;
|
||||
int _recv_size;
|
||||
void *_async_context;
|
||||
};
|
||||
|
||||
struct TM_PRS_BUFF {
|
||||
struct TM_PRS_HDR {
|
||||
char _tm_name[20];
|
||||
unsigned char _tm_id[4];
|
||||
} _tm_hdr;
|
||||
struct TM_PRS_PROG {
|
||||
unsigned char _pid[4];
|
||||
DWORD _nbr;
|
||||
char _name[16];
|
||||
BYTE _trigger_mode; // Ext/Cont
|
||||
BYTE _int_prevention; // ON/Off
|
||||
BYTE _trigger_rate; // ON/OFF
|
||||
BYTE _unk1;
|
||||
unsigned char _unk2[4];
|
||||
struct TM_HEAD {
|
||||
BYTE _x_measure_range;
|
||||
BYTE _y_measure_range;
|
||||
BYTE _threshold;
|
||||
BYTE _unk1; // Not used
|
||||
struct TM_MASK {
|
||||
BYTE _mk_type[4];
|
||||
short int _mk_x1; // Triangle has three pairs, rectangle has two pairs.
|
||||
short int _mk_y1;
|
||||
short int _mk_x2;
|
||||
short int _mk_y2;
|
||||
short int _mk_x3;
|
||||
short int _mk_y3;
|
||||
} _tm_mask[5];
|
||||
} _tm_head[2];
|
||||
BYTE _unk3[4];
|
||||
BYTE _unk4[4];
|
||||
struct TM_CORR {
|
||||
BYTE _unk1[4];
|
||||
short int _i1;
|
||||
short int _i2;
|
||||
short int _i3;
|
||||
short int _i4;
|
||||
BYTE _unk5[4];
|
||||
BYTE _unk6[4];
|
||||
BYTE _unk7[4];
|
||||
BYTE _unk8[4];
|
||||
BYTE _unk9[4];
|
||||
BYTE _unk10[4];
|
||||
} _tm_head_corr[2];
|
||||
struct TM_CORR1 {
|
||||
BYTE _img_reg;
|
||||
BYTE _img_src_speed;
|
||||
BYTE _img_src_ang;
|
||||
BYTE _img_corr_val;
|
||||
BYTE _unk4[4];
|
||||
short int _i[12];
|
||||
BYTE _unk5[4];
|
||||
BYTE _unk6[4];
|
||||
short int _i1[4];
|
||||
BYTE _unk7[4];
|
||||
BYTE _unk8[4];
|
||||
BYTE _unk9[4];
|
||||
} _tm_head_corr1[2];
|
||||
BYTE _meas_type;
|
||||
BYTE _unk_type_1;
|
||||
BYTE _a_b_calculation;
|
||||
BYTE _unk_type_3;
|
||||
BYTE _unk11[4];
|
||||
short int _x1;
|
||||
short int _y1;
|
||||
short int _x2;
|
||||
short int _y2;
|
||||
BYTE _unk5[1008];
|
||||
struct TM_OUT
|
||||
{
|
||||
char _out_name[16];
|
||||
BYTE _unk1[4];
|
||||
BYTE _ave_meas; // bin pos;
|
||||
BYTE _alarm;
|
||||
BYTE _meas_mode;
|
||||
BYTE _min_disp_unit;
|
||||
long _unk_scale1;
|
||||
long _meas_input_1_v1;
|
||||
long _meas_input_1_d1;
|
||||
long _meas_input_2_v2;
|
||||
long _meas_input_2_d2;
|
||||
long _unk_scale6;
|
||||
long _unk_scale7;
|
||||
long _offset;
|
||||
long _tol_upper_limit;
|
||||
long _tol_lower_limit;
|
||||
} _tm_out[16];
|
||||
BYTE _tm_timing_term_byte[16];
|
||||
BYTE _tm_zero_term_byte[16];
|
||||
BYTE _tm_binary_output_byte[16];
|
||||
BYTE _unk_flag[4];
|
||||
struct {
|
||||
long _meas_val_1;
|
||||
long _output_voltage_1;
|
||||
long _meas_val_2;
|
||||
long _output_voltage_2;
|
||||
} _tm_analog[2];
|
||||
BYTE _storage;
|
||||
BYTE _image_storage_head;
|
||||
BYTE _image_storage_mode;
|
||||
BYTE _unk_flag11;
|
||||
BYTE _image_storage_no_data_pts;
|
||||
BYTE _image_storage_skipping;
|
||||
BYTE _unk_flags2[2];
|
||||
BYTE _auto_send[16]; //
|
||||
BYTE _data_out_timing;
|
||||
BYTE _unk_flags3[3];
|
||||
long _checksum;
|
||||
} _tm_prs[16];
|
||||
BYTE _tm_unk[580];
|
||||
struct TM_TRLR {
|
||||
BYTE _aaa[4];
|
||||
DWORD _trailer[33*8];
|
||||
BYTE _a8a[4];
|
||||
} _tm_trailer;
|
||||
};
|
||||
|
||||
//======================================================================================
|
||||
class CKeyenceTM065_Proto
|
||||
{
|
||||
public:
|
||||
//
|
||||
CKeyenceTM065_Proto();
|
||||
virtual ~CKeyenceTM065_Proto();
|
||||
struct_ep ep_buff;
|
||||
usb_dev_handle *g_dev;
|
||||
int Init_Keyence();
|
||||
int Exit_Keyence();
|
||||
void _process_rcv_transfer_data();
|
||||
usb_dev_handle* _open_usb_dev(void);
|
||||
int _usb_reset(void);
|
||||
int _start_machine();
|
||||
int _shutdown_machine();
|
||||
int _send_usb_data();
|
||||
int _send_cmd_KEYENCE_CMD_GET_DATA();
|
||||
int _process_KEYENCE_CMD_GET_DATA();
|
||||
int _get_image();
|
||||
int _put_program();
|
||||
int _get_program();
|
||||
int _init_program();
|
||||
int _read_env();
|
||||
int _write_env();
|
||||
int _set_config(); // sets trigger etc.
|
||||
int _replay_capture(CString cFileName);
|
||||
int _read_prs_file(CString cFileName);
|
||||
TM_PRS_BUFF TM_Buff;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,82 @@
|
||||
#include "StdAfx.h"
|
||||
#include "Keyence_Laser.h"
|
||||
|
||||
|
||||
|
||||
CKeyence_Laser::CKeyence_Laser()
|
||||
{
|
||||
}
|
||||
|
||||
CKeyence_Laser::~CKeyence_Laser()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CKeyence_Laser::KeyenceLaserInit(void)
|
||||
{
|
||||
m_hLkif=LoadLibrary(_T("LkIF.dll"));
|
||||
if(m_hLkif)
|
||||
{
|
||||
m_pGetCalcData=(pLKIF_GetCalcData)GetProcAddress(m_hLkif,"LKIF_GetCalcData");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void CKeyence_Laser::Get_KeyenceLaserData(float *LaserValue1,float *LaserValue2)
|
||||
{
|
||||
*LaserValue1=10;
|
||||
*LaserValue2=10;
|
||||
LKIF_FLOATVALUE GetVal1,GetVal2;
|
||||
if((*m_pGetCalcData)(&GetVal1,&GetVal2)!=1)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
switch(GetVal1.FloatResult)
|
||||
{
|
||||
case LKIF_FLOATRESULT_RANGEOVER_P:
|
||||
{
|
||||
*LaserValue1=50;
|
||||
break;
|
||||
}
|
||||
case LKIF_FLOATRESULT_RANGEOVER_N:
|
||||
{
|
||||
*LaserValue1=-50;
|
||||
break;
|
||||
}
|
||||
case LKIF_FLOATRESULT_WAITING:
|
||||
{
|
||||
*LaserValue1=0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
*LaserValue1=GetVal1.Value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(GetVal2.FloatResult)
|
||||
{
|
||||
case LKIF_FLOATRESULT_RANGEOVER_P:
|
||||
{
|
||||
*LaserValue2=50;
|
||||
break;
|
||||
}
|
||||
case LKIF_FLOATRESULT_RANGEOVER_N:
|
||||
{
|
||||
*LaserValue2=-50;
|
||||
break;
|
||||
}
|
||||
case LKIF_FLOATRESULT_WAITING:
|
||||
{
|
||||
*LaserValue2=0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
*LaserValue2=GetVal2.Value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// protocol for control SevenOcean's Machine
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#ifndef AFX_KEYENCE__LASER_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
#define AFX_KEYENCE__LASER_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "LkIF.h"
|
||||
|
||||
typedef BOOL (WINAPI* pLKIF_GetCalcData)(OUT LKIF_FLOATVALUE *CalcData1,OUT LKIF_FLOATVALUE *CalcData2);
|
||||
// Starting the Data Storage
|
||||
typedef BOOL (WINAPI* pLKIF_DataStorageStart)(void);
|
||||
// Stopping the Data Storage
|
||||
typedef BOOL (WINAPI* pLKIF_DataStorageStop)(void);
|
||||
// Initializing the Data Storage
|
||||
typedef BOOL (WINAPI* pLKIF_DataStorageInit)(void);
|
||||
// Outputting the Data Storage
|
||||
typedef BOOL (WINAPI* pLKIF_DataStorageGetData)(IN int OutNo,IN int NumOutBuffer,OUT LKIF_FLOATVALUE *OutBuffer,OUT int *NumReceived);
|
||||
// Data Storage Accumulation Status Output
|
||||
typedef BOOL (WINAPI* pLKIF_DataStorageGetStatus)(IN int OutNo,OUT BOOL *IsStorage,OUT int *NumStorageData);
|
||||
|
||||
|
||||
//======================================================================================
|
||||
class CKeyence_Laser
|
||||
{
|
||||
public:
|
||||
|
||||
CKeyence_Laser();
|
||||
virtual ~CKeyence_Laser();
|
||||
|
||||
//»ñÈ¡Êý¾ÝµÄº¯ÊýÖ¸Õë
|
||||
pLKIF_GetCalcData m_pGetCalcData;
|
||||
HINSTANCE m_hLkif;
|
||||
void KeyenceLaserInit(void);
|
||||
void Get_KeyenceLaserData(float *LaserValue1,float *LaserValue2);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,285 @@
|
||||
#include "stdafx.h"
|
||||
#include "Keyence_Proto.h"
|
||||
#include "KeyenceStatus.h"
|
||||
|
||||
#define MY_CONFIG 1
|
||||
#define MAX_DEVPATH_LENGTH 256
|
||||
#define ENDPOINT_TIMEOUT 500
|
||||
|
||||
//******************************************************************************
|
||||
// Look at the return data from EP_01
|
||||
// The result determines how many EP_82 we need to send out based on _cmd0 and _cmd1.
|
||||
//
|
||||
void CKeyence_Proto::_process_rcv_transfer_data_ep01()
|
||||
{
|
||||
switch (ep_buff_ep01._cmd0)
|
||||
{
|
||||
case _CMD0_0800:
|
||||
break;
|
||||
case _CMD0_0C00:
|
||||
switch (ep_buff_ep01._cmd1)
|
||||
{
|
||||
case _CMD1_0730:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
case _CMD0_100a:
|
||||
break;
|
||||
case _CMD0_1400:
|
||||
break;
|
||||
case _CMD0_3000:
|
||||
break;
|
||||
case _CMD0_4800:
|
||||
break;
|
||||
case _CMD0_4c00:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
//******************************************************************************
|
||||
void CKeyence_Proto::_process_rcv_transfer_data_ep82()
|
||||
{
|
||||
_process_KEYENCE_CMD_GET_LASER_DATA();
|
||||
};
|
||||
|
||||
//******************************************************************************
|
||||
CKeyence_Proto::CKeyence_Proto()
|
||||
{
|
||||
ep_buff_ep82._buff = (char *)malloc(MAX_KEYENCE_EP_01_BUFF_SIZE);
|
||||
ep_buff_ep01._buff = (char *)malloc(MAX_KEYENCE_EP_82_BUFF_SIZE);
|
||||
ep_buff_ep01._size = 0;
|
||||
ep_buff_ep82._size = 0;
|
||||
ep_buff_ep01._async_context = NULL;
|
||||
ep_buff_ep82._async_context = NULL;
|
||||
ep_buff_ep01._cmd0 = 0;
|
||||
ep_buff_ep82._cmd0 = 0;
|
||||
ep_buff_ep01._cmd1 = 0;
|
||||
ep_buff_ep82._cmd1 = 0;
|
||||
};
|
||||
|
||||
//******************************************************************************
|
||||
CKeyence_Proto::~CKeyence_Proto()
|
||||
{
|
||||
free(ep_buff_ep82._buff);
|
||||
free(ep_buff_ep01._buff);
|
||||
}
|
||||
|
||||
#pragma warning(disable:4996)
|
||||
//******************************************************************************
|
||||
|
||||
//******************************************************************************
|
||||
usb_dev_handle* CKeyence_Proto::_open_usb_dev(void)
|
||||
{
|
||||
struct usb_bus *bus = NULL;
|
||||
struct usb_device *dev = NULL;
|
||||
|
||||
for (bus = usb_get_busses(); bus; bus = bus->next)
|
||||
{
|
||||
for (dev = bus->devices; dev; dev = dev->next)
|
||||
{
|
||||
if (dev->descriptor.idVendor == KEYENCE_VID && dev->descriptor.idProduct == KEYENCE_PID)
|
||||
{
|
||||
return usb_open(dev);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
int CKeyence_Proto::_usb_reset(void)
|
||||
{
|
||||
if (g_dev)
|
||||
{
|
||||
usb_reset(g_dev);
|
||||
g_dev = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(0);
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
int CKeyence_Proto::Init_Keyence()
|
||||
{
|
||||
int usb_status = NULL;
|
||||
usb_init(); // initialize the library
|
||||
usb_status = usb_find_busses(); // find all busses
|
||||
usb_status = usb_find_devices(); // find all connected devices
|
||||
g_dev = _open_usb_dev();
|
||||
if (!g_dev)
|
||||
{
|
||||
MessageBox(NULL, _T("Unable to open device"), _T("Message"), MB_OK);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
|
||||
if (usb_set_configuration(g_dev, MY_CONFIG) < 0)
|
||||
{
|
||||
MessageBox(NULL, _T("Unable to SET CONFIGURATION"), _T("Message"), MB_OK);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
|
||||
if (usb_claim_interface(g_dev, 0) < 0)
|
||||
{
|
||||
usb_close(g_dev);
|
||||
MessageBox(NULL, _T("Unable to CLAIM DEVICE"), _T("Message"), MB_OK);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
int CKeyence_Proto::Exit_Keyence()
|
||||
{
|
||||
if (g_dev)
|
||||
{
|
||||
usb_release_interface(g_dev,0);
|
||||
usb_close(g_dev);
|
||||
g_dev = NULL;
|
||||
}
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
// This startup just kicks off the EP_KEYENCE_81 worker thread.
|
||||
//******************************************************************************
|
||||
int CKeyence_Proto::_start_machine()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//===============================================================================
|
||||
int CKeyence_Proto::_shutdown_machine()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//===============================================================================
|
||||
// Keyence Protocol - This can be processed serially.
|
||||
// Send data on EP_01 channel.
|
||||
// Receive data on EP_01.
|
||||
// Send data on EP_82 channel.
|
||||
// Receive data on EP_82 channel.
|
||||
// if more data needs to be received, send data to EP_82 channel.
|
||||
// (Note, we do not receive Image Data, so we will not receive 0x40000 bytes.
|
||||
// But we must make provision for receiving and sending 0x40000 bytes. (512x512).
|
||||
//===============================================================================
|
||||
int CKeyence_Proto::_send_usb_data()
|
||||
{
|
||||
int _ret;
|
||||
_ret = usb_bulk_setup_async(g_dev, &ep_buff_ep01._async_context, EP_KEYENCE_01);
|
||||
if (_ret < 0)
|
||||
{
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
_ret = usb_submit_async(ep_buff_ep01._async_context, ep_buff_ep01._buff, ep_buff_ep01._size);
|
||||
if (_ret < 0)
|
||||
{
|
||||
usb_free_async(&ep_buff_ep01._async_context);
|
||||
return KEYENCE_STATUS_DATALINK_ERROR;
|
||||
}
|
||||
_ret = usb_reap_async(ep_buff_ep01._async_context, 10000);
|
||||
if (_ret > 0)
|
||||
{
|
||||
_process_rcv_transfer_data_ep01();
|
||||
usb_free_async(&ep_buff_ep01._async_context);
|
||||
}
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_send_cmd_KEYENCE_CMD_GET_LASER_DATA()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_process_KEYENCE_CMD_GET_LASER_DATA()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_get_image()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_put_program()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_read_env()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_write_env()
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_set_config() // sets trigger etc.
|
||||
{
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
//
|
||||
// The file must be in groups of 4s.
|
||||
//
|
||||
// > [82] Signal Receive Data
|
||||
//
|
||||
// > [endpoint 0x00000082] 0000000e
|
||||
// < [endpoint 0x00000082] 00000009 0800000007050500ff
|
||||
// > [endpoint 0x00000082] 00000005
|
||||
// < [endpoint 0x00000082] 00000000
|
||||
//
|
||||
// > Signals Send Data
|
||||
//
|
||||
// > [endpoint 0x00000001] 00000004 0c000000
|
||||
// < [endpoint 0x00000001] 00000004
|
||||
// > [endpoint 0x00000001] 00000200 0c00000007040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000099972afd90d52afd3ff72afd49062bfd63142bfd3cff2afd81e42afd3abc2afdab802afdee0c2afdf93e29fd946227fde8a827fd212263fd6b7562fd237461fd9d4462fd708962fda6b462fd57db62fd99ed62fd96f462fdb2e362fda4c662fd53a162fd6a6962fd740e62fd266c61fd3f0a60fdd41360fdb9839afd06319afd259e99fdfd299afdf7689afd71979afd6cb69afd66c99afd64d09afd04be9afd8ba19afdfc7a9afd8b469afdcdfb99fd1c7b99fd2c7698fd3e5498fd46ffd1fd5eebd1fdcaa6d1fd4506d2fdbc3fd2fdb568d2fda982d2fdad8bd2fd8790d2fddd81d2fdc66cd2fd4a4bd2fd5e1ad2fd37d9d1fd3872d1fdd8b2d0fdaa74d0fdce9009fe8ba509fe749509fe18d809fe01050afe852a0afe1a3f0afe1e490afe4c4f0afece470afe96340afe84150afe48e609fe7ea909fe095609fed3c908fe697708fe433141fe105e41fe8b6d41fe2a9d41fe20c641feb0e241fe3af541fe98fe41fe11fe41feadf741feffe541fe8fce41feeaa841fec46f41feb72a41fe77c340feee6740fe23e978fe741a79fe363d79fe9c5e79fec27a79fe449679fe92a979fe1aae79fea9aa79fe0ca179fe219379fe
|
||||
// < [endpoint 0x00000001] 00000200
|
||||
//
|
||||
//
|
||||
//==============================================================
|
||||
int CKeyence_Proto::_replay_capture(CString s_replay_file)
|
||||
{
|
||||
char cSize[9];
|
||||
int iSendSize;
|
||||
int iRcvSize;
|
||||
FILE* pInFile;
|
||||
int iEP;
|
||||
_wfopen_s(&pInFile, s_replay_file, _T("r"));
|
||||
if (pInFile == NULL)
|
||||
return KEYENCE_STATUS_REPLAY_FILE_ERROR;
|
||||
fgets(ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, pInFile ); // pick up the first line
|
||||
while (!feof(pInFile))
|
||||
{
|
||||
memset(cSize, 0 , 9);
|
||||
memcpy(cSize, ep_buff._buff+24, 8);
|
||||
sscanf_s(cSize, "%8x", &iSendSize); // get the length of the transmission
|
||||
iEP = (*(ep_buff._buff+21) == '1') ? 0x01:0x82;
|
||||
if (*ep_buff._buff == '>')
|
||||
{
|
||||
fgets((char *)ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, pInFile ); // skip the input line
|
||||
usb_bulk_write(g_dev, iEP, (char *)(ep_buff._buff+33), iSendSize, 5000);
|
||||
iRcvSize = usb_bulk_read(g_dev, iEP, (char *)ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, 5000);
|
||||
}
|
||||
fgets((char *)ep_buff._buff, MAX_KEYENCE_EP_BUFF_SIZE, pInFile ); // pick up the first line
|
||||
};
|
||||
fclose(pInFile);
|
||||
return KEYENCE_STATUS_NORMAL;
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// protocol for control SevenOcean's Machine
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#ifndef AFX_KEYENCE_Proto_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
#define AFX_KEYENCE_Proto_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Include\lusb0_usb.h"
|
||||
#include "..\Keyence\KeyenceStatus.h"
|
||||
|
||||
#define _CMD0_0800 0x08000000
|
||||
#define _CMD0_0C00 0x0c000000 // -> 0704 Reply 0800 0705
|
||||
// -> 0710 Reply 0c00 0711
|
||||
// -> 071a Reply 8400 071b
|
||||
|
||||
#define _CMD0_100a 0x100a0000 // -> 0730 Reply 0c00 0731
|
||||
#define _CMD0_1400 0x14000000 // ???? Send 4 bytes 1400,
|
||||
// then send 200 bytes
|
||||
// Request 40000 bytes image
|
||||
#define _CMD0_3000 0x30000000 // -> 0730 Reply 0c00 0731
|
||||
#define _CMD0_4800 0x48000000 // -> 0730 Reply 0c00 0731
|
||||
#define _CMD0_4c00 0x4c000000 // -> 0730 Reply 0c00 0731
|
||||
|
||||
#define _CMD1_0730 0x07300000
|
||||
#define _CMD1_0731 0x07310000
|
||||
|
||||
#define MAX_KEYENCE_EP_01_BUFF_SIZE 0xC00 // enough for 512x512 bytes image
|
||||
#define MAX_KEYENCE_EP_82_BUFF_SIZE 0x40000 // enough for 512x512 bytes image
|
||||
#define MAX_KEYENCE_EP_BUFF_SIZE 0X40000
|
||||
|
||||
#define USB_ENDPOINT_TYPE_CONTROL 0
|
||||
#define USB_ENDPOINT_TYPE_ISOCHRONOUS 1
|
||||
#define USB_ENDPOINT_TYPE_BULK 2
|
||||
#define USB_ENDPOINT_TYPE_INTERRUPT 3
|
||||
|
||||
#define USB_DEVICE_DESCRIPTOR_TYPE 1
|
||||
#define USB_CONFIGURATION_DESCRIPTOR_TYPE 2
|
||||
|
||||
// Device configuration and interface id.
|
||||
#define KEYENCE_USB_CONFIG 1
|
||||
#define KEYENCE_USB_INTF 0
|
||||
|
||||
#define EP_KEYENCE_01 0x01
|
||||
#define EP_KEYENCE_82 0x82
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
#define KEYENCE_VID 0x0720
|
||||
#define KEYENCE_PID 0x000A
|
||||
|
||||
struct struct_ep
|
||||
{
|
||||
char *_buff;
|
||||
DWORD _cmd0;
|
||||
DWORD _cmd1;
|
||||
int _size;
|
||||
void *_async_context;
|
||||
};
|
||||
|
||||
//======================================================================================
|
||||
class CKeyence_Proto
|
||||
{
|
||||
public:
|
||||
//
|
||||
CKeyence_Proto();
|
||||
virtual ~CKeyence_Proto();
|
||||
struct_ep ep_buff_ep01;
|
||||
union
|
||||
{
|
||||
struct_ep ep_buff_ep82;
|
||||
struct_ep ep_buff;
|
||||
};
|
||||
usb_dev_handle *g_dev;
|
||||
int Init_Keyence();
|
||||
int Exit_Keyence();
|
||||
void _process_rcv_transfer_data_ep01();
|
||||
void _process_rcv_transfer_data_ep82();
|
||||
usb_dev_handle* _open_usb_dev(void);
|
||||
int _usb_reset(void);
|
||||
int _start_machine();
|
||||
int _shutdown_machine();
|
||||
int _send_usb_data();
|
||||
int _send_cmd_KEYENCE_CMD_GET_LASER_DATA();
|
||||
int _process_KEYENCE_CMD_GET_LASER_DATA();
|
||||
int _get_image();
|
||||
int _put_program();
|
||||
int _read_env();
|
||||
int _write_env();
|
||||
int _set_config(); // sets trigger etc.
|
||||
int _replay_capture(CString cFileName);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,320 @@
|
||||
#ifndef LKIF_INCLUDED
|
||||
#define LKIF_INCLUDED
|
||||
|
||||
#ifdef I_AM_LKIF
|
||||
#define EXP __declspec(dllexport)
|
||||
#else
|
||||
#define EXP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// Measurement value structures
|
||||
typedef enum {
|
||||
LKIF_FLOATRESULT_VALID, // valid data
|
||||
LKIF_FLOATRESULT_RANGEOVER_P, // over range at positive (+) side
|
||||
LKIF_FLOATRESULT_RANGEOVER_N, // over range at negative (-) side
|
||||
LKIF_FLOATRESULT_WAITING, // comparator result
|
||||
} LKIF_FLOATRESULT;
|
||||
|
||||
typedef struct {
|
||||
LKIF_FLOATRESULT FloatResult; // valid or invalid data
|
||||
float Value; // measurement value during LKIF_FLOATRESULT_VALID.
|
||||
// Any other times will return an invalid value
|
||||
} LKIF_FLOATVALUE;
|
||||
///////////////////////////////////////////////
|
||||
// Measurement Control Command
|
||||
//
|
||||
// Measurement Value Output
|
||||
EXP BOOL WINAPI LKIF_GetCalcData(OUT LKIF_FLOATVALUE *CalcData1,OUT LKIF_FLOATVALUE *CalcData2);
|
||||
// Timing ON/OFF
|
||||
EXP BOOL WINAPI LKIF_SetTiming(IN int OutNo,IN BOOL IsOn);
|
||||
// Auto-zero ON/OFF
|
||||
EXP BOOL WINAPI LKIF_SetZero(IN int OutNo,IN BOOL IsOn);
|
||||
// Reset
|
||||
EXP BOOL WINAPI LKIF_SetReset(IN int OutNo);
|
||||
// Panel Lock
|
||||
EXP BOOL WINAPI LKIF_SetPanelLock(IN BOOL IsLock);
|
||||
// Program Change
|
||||
EXP BOOL WINAPI LKIF_SetProgramNo(IN int ProgramNo);
|
||||
// Program Check
|
||||
EXP BOOL WINAPI LKIF_GetProgramNo(OUT int *ProgramNo);
|
||||
// Statistical Results Output
|
||||
typedef struct {
|
||||
LKIF_FLOATVALUE ToleUpper; // tolerance upper limit
|
||||
LKIF_FLOATVALUE ToleLower; // tolerance lower limit
|
||||
LKIF_FLOATVALUE AverageValue; // average value
|
||||
LKIF_FLOATVALUE MaxValue; // maximum value
|
||||
LKIF_FLOATVALUE MinValue; // minimum value
|
||||
LKIF_FLOATVALUE DifValue; // maximum value - minimum value
|
||||
LKIF_FLOATVALUE SdValue; // standard deviation
|
||||
LONG DataCnt; // number of all data
|
||||
LONG HighDataCnt; // number of tolerance High data
|
||||
LONG GoDataCnt; // number of tolerance Go data
|
||||
LONG LowDataCnt; // number of tolerance Low data
|
||||
} LKIF_FIGUREDATA;
|
||||
EXP BOOL WINAPI LKIF_GetFigureData(IN int OutNo,OUT LKIF_FIGUREDATA *FigureData);
|
||||
// Clearing Statistics
|
||||
EXP BOOL WINAPI LKIF_ClearFigureData(void);
|
||||
// Starting the Data Storage
|
||||
EXP BOOL WINAPI LKIF_DataStorageStart(void);
|
||||
// Stopping the Data Storage
|
||||
EXP BOOL WINAPI LKIF_DataStorageStop(void);
|
||||
// Initializing the Data Storage
|
||||
EXP BOOL WINAPI LKIF_DataStorageInit(void);
|
||||
// Outputting the Data Storage
|
||||
EXP BOOL WINAPI LKIF_DataStorageGetData(IN int OutNo,IN int NumOutBuffer,OUT LKIF_FLOATVALUE *OutBuffer,OUT int *NumReceived);
|
||||
// Data Storage Accumulation Status Output
|
||||
EXP BOOL WINAPI LKIF_DataStorageGetStatus(IN int OutNo,OUT BOOL *IsStorage,OUT int *NumStorageData);
|
||||
// Receive Light Waveform
|
||||
EXP BOOL WINAPI LKIF_GetLight(IN int HeadNo,IN int PeekNo,OUT int *MeasurePosition,OUT int *NumReaded,OUT BYTE *Value);
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// Change Parameter Command
|
||||
//
|
||||
// Display Panel Switch
|
||||
EXP BOOL WINAPI LKIF_SetPanel(IN int OutNo);
|
||||
// Set Tolerance
|
||||
EXP BOOL WINAPI LKIF_SetTolerance(IN int OutNo,IN int UpperLimit,IN int LowerLimit,IN int Hysteresis);
|
||||
// Set ABLE
|
||||
typedef enum {
|
||||
LKIF_ABLEMODE_AUTO, // automatic
|
||||
LKIF_ABLEMODE_MANUAL, // manual
|
||||
} LKIF_ABLEMODE;
|
||||
EXP BOOL WINAPI LKIF_SetAbleMode(IN int HeadNo,IN LKIF_ABLEMODE AbleMode);
|
||||
// Set ABLE Control Range
|
||||
EXP BOOL WINAPI LKIF_SetAbleMinMax(IN int HeadNo,IN int Min,IN int Max);
|
||||
// Set Measurement Mode
|
||||
typedef enum {
|
||||
LKIF_MEASUREMODE_NORMAL, // normal
|
||||
LKIF_MEASUREMODE_HALF_T, // translucent object
|
||||
LKIF_MEASUREMDOE_TRAN_1, // transparent object
|
||||
LKIF_MEASUREMODE_TRAN_2, // transparent object 2
|
||||
LKIF_MEASUREMODE_MRS, // multireflective object
|
||||
} LKIF_MEASUREMODE;
|
||||
EXP BOOL WINAPI LKIF_SetMeasureMode(IN int HeadNo,IN LKIF_MEASUREMODE MeasureMode);
|
||||
// Set Number of Times of Alarm Processing
|
||||
EXP BOOL WINAPI LKIF_SetNumAlarm(IN int HeadNo,IN int NumAlarm);
|
||||
// Set Alarm Level
|
||||
EXP BOOL WINAPI LKIF_SetAlarmLevel(IN int HeadNo,IN int AlarmLevel);
|
||||
// Starting the ABLE Calibration
|
||||
EXP BOOL WINAPI LKIF_AbleStart(IN int HeadNo);
|
||||
// Finishing the ABLE Calibration
|
||||
EXP BOOL WINAPI LKIF_AbleStop(void);
|
||||
// Stopping the ABLE Calibration
|
||||
EXP BOOL WINAPI LKIF_AbleCancel(void);
|
||||
// Set Mounting Mode
|
||||
typedef enum {
|
||||
LKIF_REFLECTIONMODE_DIFFUSION, // diffuse reflection
|
||||
LKIF_REFLECTIONMODE_MIRROR, // specular reflection
|
||||
} LKIF_REFLECTIONMODE;
|
||||
EXP BOOL WINAPI LKIF_SetReflectionMode(IN int HeadNo,IN LKIF_REFLECTIONMODE ReflectionMode);
|
||||
// Set Calculation Method
|
||||
typedef enum {
|
||||
LKIF_CALCMETHOD_HEADA, // head A
|
||||
LKIF_CALCMETHOD_HEADB, // head B
|
||||
LKIF_CALCMETHOD_HEAD_HEADA_PLUS_HEADB, // head A+head B
|
||||
LKIF_CALCMETHOD_HEAD_HEADA_MINUS_HEADB, // head A-head B
|
||||
LKIF_CALCMETHOD_HEAD_HEADA_TRANSPARENT, // head A transparent object
|
||||
LKIF_CALCMETHOD_HEAD_HEADB_TRANSPARENT, // head B transparent object
|
||||
} LKIF_CALCMETHOD;
|
||||
// Measurement target
|
||||
typedef enum {
|
||||
LKIF_CALCTARGET_PEAK_1, // peak 1
|
||||
LKIF_CALCTARGET_PEAK_2, // peak 2
|
||||
LKIF_CALCTARGET_PEAK_3, // peak 3
|
||||
LKIF_CALCTARGET_PEAK_4, // peak 4
|
||||
LKIF_CALCTARGET_PEAK_1_2, // peak 1-peak 2
|
||||
LKIF_CALCTARGET_PEAK_1_3, // peak 1-peak 3
|
||||
LKIF_CALCTARGET_PEAK_1_4, // peak 1-peak 4
|
||||
LKIF_CALCTARGET_PEAK_2_3, // peak 2-peak 3
|
||||
LKIF_CALCTARGET_PEAK_2_4, // peak 2-peak 4
|
||||
LKIF_CALCTARGET_PEAK_3_4, // peak 3-peak 4
|
||||
} LKIF_CALCTARGET;
|
||||
EXP BOOL WINAPI LKIF_SetCalcMethod(IN int OutNo,IN LKIF_CALCMETHOD CalcMethod,LKIF_CALCTARGET CalcTarget);
|
||||
// Set Scaling
|
||||
EXP BOOL WINAPI LKIF_SetScaling(IN int OutNo,IN int HeadNo,IN int InputValue1,IN int OutputValue1,IN int InputValue2,IN int OutputValue2);
|
||||
// Set Filter Mode
|
||||
typedef enum {
|
||||
LKIF_FILTERMODE_MOVING_AVERAGE, // moving average
|
||||
LKIF_FILTERMODE_LOWPASS, // low pass filter
|
||||
LKIF_FILTERMODE_HIGHPASS, // high pass filter
|
||||
} LKIF_FILTERMODE;
|
||||
EXP BOOL WINAPI LKIF_SetFilterMode(IN int OutNo,OUT LKIF_FILTERMODE FilterMode);
|
||||
// Set Number of Times for Averaging
|
||||
typedef enum {
|
||||
LKIF_AVERAGE_1, // 1 time
|
||||
LKIF_AVERAGE_4, //
|
||||
LKIF_AVERAGE_16, //
|
||||
LKIF_AVERAGE_64, //
|
||||
LKIF_AVERAGE_256, //
|
||||
LKIF_AVERAGE_1024, //
|
||||
LKIF_AVERAGE_4096, //
|
||||
LKIF_AVERAGE_16384, //
|
||||
LKIF_AVERAGE_65536, //
|
||||
LKIF_AVERAGE_262144, // 262144 times
|
||||
} LKIF_AVERAGE;
|
||||
EXP BOOL WINAPI LKIF_SetAverage(IN int OutNo,IN LKIF_AVERAGE Average);
|
||||
// Set Cutoff Frequency
|
||||
typedef enum {
|
||||
LKIF_CUTOFFFREQUENCY_1000, // 1000Hz
|
||||
LKIF_CUTOFFFREQUENCY_300, // 300Hz
|
||||
LKIF_CUTOFFFREQUENCY_100, // 100Hz
|
||||
LKIF_CUTOFFFREQUENCY_30, // 30Hz
|
||||
LKIF_CUTOFFFREQUENCY_10, // 10Hz
|
||||
LKIF_CUTOFFFREQUENCY_3, // 3Hz
|
||||
LKIF_CUTOFFFREQUENCY_1, // 1Hz
|
||||
LKIF_CUTOFFFREQUENCY_0_3, // 0.3Hz
|
||||
LKIF_CUTOFFFREQUENCY_0_1, // 0.1Hz
|
||||
} LKIF_CUTOFFFREQUENCY;
|
||||
EXP BOOL WINAPI LKIF_SetCutOffFrequency(IN int OutNo,IN LKIF_CUTOFFFREQUENCY CutOffFrequency);
|
||||
// Set Trigger Mode
|
||||
typedef enum {
|
||||
LKIF_TRIGGERMODE_EXT1, // external trigger 1
|
||||
LKIF_TRIGGERMODE_EXT2, // external trigger 2
|
||||
} LKIF_TRIGGERMODE;
|
||||
EXP BOOL WINAPI LKIF_SetTriggerMode(IN int OutNo,IN LKIF_TRIGGERMODE TriggerMode);
|
||||
// Set Offset
|
||||
EXP BOOL WINAPI LKIF_SetOffset(IN int OutNo,IN int Offset);
|
||||
// Set Analog Output Scaling
|
||||
EXP BOOL WINAPI LKIF_SetAnalogScaling(IN int OutNo,IN int InputValue1,IN int OutputVoltage1,IN int InputValue2,IN int OutputVoltage2);
|
||||
// Set Calculation Mode
|
||||
typedef enum {
|
||||
LKIF_CALCMODE_NORMAL, // normal
|
||||
LKIF_CALCMODE_PEAKHOLD, // peak hold
|
||||
LKIF_CALCMODE_BOTTOMHOLD, // bottom hold
|
||||
LKIF_CALCMODE_PEAKTOPEAKHOLD, // peak-to-peak hold
|
||||
LKIF_CALCMODE_SAMPLEHOLD, // sample hold
|
||||
LKIF_CALCMODE_AVERAGEHOLD, // average hold
|
||||
} LKIF_CALCMODE;
|
||||
EXP BOOL WINAPI LKIF_SetCalcMode(IN int OutNo,IN LKIF_CALCMODE CalcMode);
|
||||
// Set Minimum Display Unit
|
||||
typedef enum {
|
||||
LKIF_DISPLAYUNIT_0000_01MM, // 0.01mm
|
||||
LKIF_DISPLAYUNIT_000_001MM, // 0.001mm
|
||||
LKIF_DISPLAYUNIT_00_0001MM, // 0.0001mm
|
||||
LKIF_DISPLAYUNIT_0_00001MM, // 0.00001mm
|
||||
LKIF_DISPLAYUNIT_00000_1UM, // 0.1um
|
||||
LKIF_DISPLAYUNIT_0000_01UM, // 0.01um
|
||||
} LKIF_DISPLAYUNIT;
|
||||
EXP BOOL WINAPI LKIF_SetDisplayUnit(IN int OutNo,IN LKIF_DISPLAYUNIT DisplayUnit);
|
||||
// Set Analog-Through
|
||||
EXP BOOL WINAPI LKIF_SetAnalogThrough(IN int OutNo,IN BOOL IsOn);
|
||||
// Set Data Storage
|
||||
typedef enum {
|
||||
LKIF_TARGETOUT_NONE, // no target OUT
|
||||
LKIF_TARGETOUT_OUT1, // OUT1
|
||||
LKIF_TARGETOUT_OUT2, // OUT2
|
||||
LKIF_TARGETOUT_BOTH, // OUT1 and OUT2
|
||||
} LKIF_TARGETOUT;
|
||||
typedef enum {
|
||||
LKIF_STORAGECYCLE_1, // sampling rate x 1
|
||||
LKIF_STORAGECYCLE_2, // sampling rate x 2
|
||||
LKIF_STORAGECYCLE_5, // sampling rate x 5
|
||||
LKIF_STORAGECYCLE_10, // sampling rate x 10
|
||||
LKIF_STORAGECYCLE_20, // sampling rate x 20
|
||||
LKIF_STORAGECYCLE_50, // sampling rate x 50
|
||||
LKIF_STORAGECYCLE_100, // sampling rate x 100
|
||||
LKIF_STORAGECYCLE_200, // sampling rate x 200
|
||||
LKIF_STORAGECYCLE_500, // sampling rate x 500
|
||||
LKIF_STORAGECYCLE_1000, // sampling rate x 1000
|
||||
} LKIF_STORAGECYCLE;
|
||||
EXP BOOL WINAPI LKIF_SetDataStorage(IN LKIF_TARGETOUT TargetOut,IN int NumStorage,IN LKIF_STORAGECYCLE StorageCycle);
|
||||
// Set Sampling Rate
|
||||
typedef enum {
|
||||
LKIF_SAMPLINGCYCLE_20USEC, // 20us
|
||||
LKIF_SAMPLINGCYCLE_50USEC, // 50us
|
||||
LKIF_SAMPLINGCYCLE_100USEC, // 100us
|
||||
LKIF_SAMPLINGCYCLE_200USEC, // 200us
|
||||
LKIF_SAMPLINGCYCLE_500USEC, // 500us
|
||||
LKIF_SAMPLINGCYCLE_1MSEC, // 1ms
|
||||
} LKIF_SAMPLINGCYCLE;
|
||||
EXP BOOL WINAPI LKIF_SetSamplingCycle(IN LKIF_SAMPLINGCYCLE SamplingCycle);
|
||||
// Set Mutual Interference Prevention
|
||||
EXP BOOL WINAPI LKIF_SetMutualInterferencePrevention(IN BOOL IsOn);
|
||||
// Set Timing Synchronization
|
||||
typedef enum {
|
||||
LKIF_SYNCHRONIZATION_ASYNCHRONOUS, // asynchronous
|
||||
LKIF_SYNCHRONIZATION_SYNCHRONIZED, // synchronous
|
||||
} LKIF_SYNCHRONIZATION;
|
||||
EXP BOOL WINAPI LKIF_SetTimingSynchronization(IN LKIF_SYNCHRONIZATION Synchronization);
|
||||
// Set Comparator Output Format
|
||||
typedef enum {
|
||||
LKIF_TOLERANCE_COMPARATOR_OUTPUT_FORMAT_NORMAL, // normal
|
||||
LKIF_TOLERANCE_COMPARATOR_OUTPUT_FORMAT_HOLD, // hold
|
||||
LKIF_TOLERANCE_COMPARATOR_OUTPUT_FORMAT_OFF_DELAY, // off-delay
|
||||
} LKIF_TOLERANCE_COMPARATOR_OUTPUT_FORMAT;
|
||||
EXP BOOL WINAPI LKIF_SetToleranceComparatorOutputFormat(IN LKIF_TOLERANCE_COMPARATOR_OUTPUT_FORMAT ToleranceComparatorOutputFormat);
|
||||
// Set Strobe Time
|
||||
typedef enum {
|
||||
LKIF_STOROBETIME_2MS, // 2ms
|
||||
LKIF_STOROBETIME_5MS, // 5ms
|
||||
LKIF_STOROBETIME_10MS, // 10ms
|
||||
LKIF_STOROBETIME_20MS, // 20ms
|
||||
} LKIF_STOROBETIME;
|
||||
EXP BOOL WINAPI LKIF_SetStorobeTime(IN LKIF_STOROBETIME StorobeTime);
|
||||
///////////////////////////////////////////////
|
||||
// Check Parameter Command
|
||||
//
|
||||
// Display Panel Check
|
||||
EXP BOOL WINAPI LKIF_GetPanel(OUT int *OutNo);
|
||||
// Get Tolerance
|
||||
EXP BOOL WINAPI LKIF_GetTolerance(IN int OutNo,OUT int *UpperLimit,OUT int *LowerLimit,OUT int *Hysteresis);
|
||||
// Get ABLE
|
||||
EXP BOOL WINAPI LKIF_GetAbleMode(IN int HeadNo,OUT LKIF_ABLEMODE *AbleMode);
|
||||
// ABLE Control Range
|
||||
EXP BOOL WINAPI LKIF_GetAbleMinMax(IN int HeadNo,OUT int *Min,OUT int *Max);
|
||||
// Get Measurement Mode
|
||||
EXP BOOL WINAPI LKIF_GetMeasureMode(IN int HeadNo,OUT LKIF_MEASUREMODE *MeasureMode);
|
||||
// Get Number of Times of Alarm Processing
|
||||
EXP BOOL WINAPI LKIF_GetNumAlarm(IN int HeadNo,OUT int *NumAlarm);
|
||||
// Get Alarm Level
|
||||
EXP BOOL WINAPI LKIF_GetAlarmLevel(IN int HeadNo,OUT int *AlarmLevel);
|
||||
// Get Mounting Mode
|
||||
EXP BOOL WINAPI LKIF_GetReflectionMode(IN int HeadNo,OUT LKIF_REFLECTIONMODE *ReflectionMode);
|
||||
// Get Calculation Method
|
||||
EXP BOOL WINAPI LKIF_GetCalcMethod(IN int OutNo,OUT LKIF_CALCMETHOD *CalcMethod,LKIF_CALCTARGET *CalcTarget);
|
||||
// Get Scaling
|
||||
EXP BOOL WINAPI LKIF_GetScaling(IN int OutNo,IN int HeadNo,OUT int *InputValue1,OUT int *OutputValue1,OUT int *InputValue2,OUT int *OutputValue2);
|
||||
// Get Filter Mode
|
||||
EXP BOOL WINAPI LKIF_GetFilterMode(IN int OutNo,OUT LKIF_FILTERMODE *FilterMode);
|
||||
// Get Number of Times for Averaging
|
||||
EXP BOOL WINAPI LKIF_GetAverage(IN int OutNo,OUT LKIF_AVERAGE *Average);
|
||||
// Get Cutoff Frequency
|
||||
EXP BOOL WINAPI LKIF_GetCutOffFrequency(IN int OutNo,OUT LKIF_CUTOFFFREQUENCY *CutOffFrequency);
|
||||
// Get Trigger Mode
|
||||
EXP BOOL WINAPI LKIF_GetTriggerMode(IN int OutNo,OUT LKIF_TRIGGERMODE *TriggerMode);
|
||||
// Get Offset
|
||||
EXP BOOL WINAPI LKIF_GetOffset(IN int OutNo,IN int *Offset);
|
||||
// Get Analog Output Scaling
|
||||
EXP BOOL WINAPI LKIF_GetAnalogScaling(IN int OutNo,OUT int *InputValue1,OUT int *OutputVoltage1,OUT int *InputValue2,OUT int *OutputVoltage2);
|
||||
// Get Calculation Mode
|
||||
EXP BOOL WINAPI LKIF_GetCalcMode(IN int OutNo,OUT LKIF_CALCMODE *CalcMode);
|
||||
// Get Minimum Display Unit
|
||||
EXP BOOL WINAPI LKIF_GetDisplayUnit(IN int OutNo,OUT LKIF_DISPLAYUNIT *DisplayUnit);
|
||||
// Analog-Through
|
||||
EXP BOOL WINAPI LKIF_GetAnalogThrough(IN int OutNo,OUT BOOL *IsOn);
|
||||
// Get Data Storage
|
||||
EXP BOOL WINAPI LKIF_GetDataStorage(IN LKIF_TARGETOUT *TargetOut,OUT int *NumStorage,OUT LKIF_STORAGECYCLE *StorageCycle);
|
||||
// Get Sampling Rate
|
||||
EXP BOOL WINAPI LKIF_GetSamplingCycle(OUT LKIF_SAMPLINGCYCLE *SamplingCycle);
|
||||
// Get Mutual Interference Prevention
|
||||
EXP BOOL WINAPI LKIF_GetMutualInterferencePrevention(OUT BOOL *IsOn);
|
||||
// Get Timing Synchronization
|
||||
EXP BOOL WINAPI LKIF_GetTimingSynchronization(OUT LKIF_SYNCHRONIZATION *Synchronization);
|
||||
// Get Comparator Output Format
|
||||
EXP BOOL WINAPI LKIF_GetToleranceComparatorOutputFormat(OUT LKIF_TOLERANCE_COMPARATOR_OUTPUT_FORMAT *ToleranceComparatorOutputFormat);
|
||||
// Get Strobe Time
|
||||
EXP BOOL WINAPI LKIF_GetStorobeTime(OUT LKIF_STOROBETIME *StorobeTime);
|
||||
///////////////////////////////////////////////
|
||||
// Mode Change Command
|
||||
//
|
||||
// Mode Switch
|
||||
typedef enum {
|
||||
LKIF_MODE_NORMAL, // normal mode
|
||||
LKIF_MODE_COMMUNICATION, // setting mode
|
||||
} LKIF_MODE;
|
||||
EXP BOOL WINAPI LKIF_SetMode(IN LKIF_MODE Mode);
|
||||
} // extern "C"
|
||||
|
||||
#endif // LKIF_INCLUDED
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#include "stdafx_net.h"
|
||||
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
|
||||
#include <afxwin.h>
|
||||
#include <afxodlgs.h> // MFC OLE dialog classes
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
@@ -0,0 +1,135 @@
|
||||
BYTE* buf = new BYTE[ 128 * 3 * SizeValue ];
|
||||
|
||||
int c = 0;
|
||||
|
||||
for ( int i = 0; i < SizeValue; i++ )
|
||||
{
|
||||
for ( int j = 0; j < 128; j++ )
|
||||
{
|
||||
unsigned char val =
|
||||
pmatrix[ i ][ j ] == 0 ? 0xFF : 0x00;
|
||||
|
||||
buf[ c + 0 ] = (BYTE) val;
|
||||
buf[ c + 1 ] = (BYTE) val;
|
||||
buf[ c + 2 ] = (BYTE) val;
|
||||
|
||||
c += 3;
|
||||
}
|
||||
}
|
||||
|
||||
SaveBitmapToFile( (BYTE*) buf,
|
||||
128,
|
||||
SizeValue,
|
||||
24,
|
||||
"C:\\MyFolder\\image_created.bmp" );
|
||||
|
||||
delete [] buf;
|
||||
|
||||
Saving the byte data as a bitmap file
|
||||
|
||||
Writing the array data as a bitmap file is accomplished by the SaveBitmapToFile module. This module essentially:
|
||||
|
||||
i. initializes a BITMAPINFOHEADER data structure with bitmap parameters (header size, padding, height, width, etc)
|
||||
|
||||
ii. initializes a BITMAPFILEHEADER structure in the appropriate way
|
||||
|
||||
iii. Creates a file handler and writes the file, bitmap info and pixel data into it to create the new bitmap file representation:
|
||||
|
||||
//
|
||||
// Save the bitmap to a bmp file
|
||||
//
|
||||
void CSimulationrun::SaveBitmapToFile( BYTE* pBitmapBits,
|
||||
LONG lWidth,
|
||||
LONG lHeight,
|
||||
WORD wBitsPerPixel,
|
||||
LPCTSTR lpszFileName )
|
||||
{
|
||||
// Some basic bitmap parameters
|
||||
unsigned long headers_size = sizeof( BITMAPFILEHEADER ) +
|
||||
sizeof( BITMAPINFOHEADER );
|
||||
unsigned long padding_size = ( 4 - ( ( lWidth * 3 ) % 4 ) ) % 4;
|
||||
unsigned long pixel_data_size = lHeight * ( ( lWidth * 3 ) + padding_size );
|
||||
|
||||
BITMAPINFOHEADER bmpInfoHeader = {0};
|
||||
|
||||
// Set the size
|
||||
bmpInfoHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
|
||||
// Bit count
|
||||
bmpInfoHeader.biBitCount = wBitsPerPixel;
|
||||
|
||||
// Use all colors
|
||||
bmpInfoHeader.biClrImportant = 0;
|
||||
|
||||
// Use as many colors according to bits per pixel
|
||||
bmpInfoHeader.biClrUsed = 0;
|
||||
|
||||
// Store as un Compressed
|
||||
bmpInfoHeader.biCompression = BI_RGB;
|
||||
|
||||
// Set the height in pixels
|
||||
bmpInfoHeader.biHeight = lHeight;
|
||||
|
||||
// Width of the Image in pixels
|
||||
bmpInfoHeader.biWidth = lWidth;
|
||||
|
||||
// Default number of planes
|
||||
bmpInfoHeader.biPlanes = 1;
|
||||
|
||||
// Calculate the image size in bytes
|
||||
bmpInfoHeader.biSizeImage = pixel_data_size;
|
||||
|
||||
BITMAPFILEHEADER bfh = {0};
|
||||
|
||||
// This value should be values of BM letters i.e 0x4D42
|
||||
// 0x4D = M 0¡Á42 = B storing in reverse order to match with endian
|
||||
bfh.bfType=0x4D42;
|
||||
/* or bfh.bfType = ¡®B¡¯+(¡®M¡¯ << 8);
|
||||
// <<8 used to shift ¡®M¡¯ to end */
|
||||
|
||||
// Offset to the RGBQUAD
|
||||
bfh.bfOffBits = headers_size;
|
||||
|
||||
// Total size of image including size of headers
|
||||
bfh.bfSize = headers_size + pixel_data_size;
|
||||
|
||||
// Create the file in disk to write
|
||||
HANDLE hFile = CreateFile( lpszFileName,
|
||||
GENERIC_WRITE,
|
||||
0,
|
||||
NULL,
|
||||
CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL );
|
||||
|
||||
// Return if error opening file
|
||||
if( !hFile ) return;
|
||||
|
||||
DWORD dwWritten = 0;
|
||||
|
||||
// Write the File header
|
||||
WriteFile( hFile,
|
||||
&bfh,
|
||||
sizeof(bfh),
|
||||
&dwWritten ,
|
||||
NULL );
|
||||
|
||||
// Write the bitmap info header
|
||||
WriteFile( hFile,
|
||||
&bmpInfoHeader,
|
||||
sizeof(bmpInfoHeader),
|
||||
&dwWritten,
|
||||
NULL );
|
||||
|
||||
// Write the RGB Data
|
||||
WriteFile( hFile,
|
||||
pBitmapBits,
|
||||
bmpInfoHeader.biSizeImage,
|
||||
&dwWritten,
|
||||
NULL );
|
||||
|
||||
// Close the file handle
|
||||
CloseHandle( hFile );
|
||||
}
|
||||
|
||||
|
||||
@@ -3111,12 +3111,6 @@ SSI_STATUS CMv_Proto::WaitForSettleXYZZM()
|
||||
// if TP active in DCC or rach mode then dont wait for settle
|
||||
MV_TRACE(_T("Enter CSsi::WaitForSettleXYZZM\n"));
|
||||
static bool bTest=true;
|
||||
//if ( bTest )
|
||||
// if ( m_lTPEnable && (m_lTPMode==0 || m_lTPMode==3) )
|
||||
// {
|
||||
// MV_TRACE(_T("Exit CSsi::WaitForSettleXYZZM m_lTPEnable && (m_lTPMode==0 || m_lTPMode==3\n"));
|
||||
// return SSI_STATUS_NORMAL;
|
||||
// }
|
||||
|
||||
// if homing is active then we dont need to wait for this settle
|
||||
if ( m_bHomingActive )
|
||||
|
||||
@@ -108,6 +108,13 @@
|
||||
const long MAXINTENSITY = 0x3FF;
|
||||
#define mvMAXLIGHTVALUE 1024
|
||||
|
||||
enum SETTLE_STATUS
|
||||
{
|
||||
NOTSETTLED = 0,
|
||||
SETTLED,
|
||||
TIMEDOUT
|
||||
};
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
//****************************************************************************************************
|
||||
@@ -406,13 +413,6 @@ struct struct_ep_buff
|
||||
HANDLE _event;
|
||||
};
|
||||
|
||||
enum SETTLE_STATUS
|
||||
{
|
||||
NOTSETTLED = 0,
|
||||
SETTLED,
|
||||
TIMEDOUT
|
||||
};
|
||||
|
||||
// CSettleStageParams and CSettleStage are copied from QVI, but QVI is based on millionths of and inch
|
||||
// and we will use microns for MV
|
||||
class CSettleStageParams
|
||||
|
||||
@@ -2027,3 +2027,13 @@ Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
//=============================================================================
|
||||
#include "stdafx.h"
|
||||
#include "Joystick_Util.h"
|
||||
|
||||
CJoystick_Util::CJoystick_Util()
|
||||
{
|
||||
};
|
||||
|
||||
CJoystick_Util::~CJoystick_Util()
|
||||
{
|
||||
};
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Joysstick_Util.h: interface for the CDataLink class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#if !defined(AFX_Joysstick_Util_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_)
|
||||
#define AFX_Joysstick_Util_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
//#include <d3dx8.h>
|
||||
#include <dinput.h>
|
||||
//#include <dxutil.h>
|
||||
|
||||
//======================================================================================
|
||||
class CJoystick_Util
|
||||
{
|
||||
public:
|
||||
|
||||
CJoystick_Util();
|
||||
virtual ~CJoystick_Util();
|
||||
LPDIRECTINPUTDEVICE8 lpdiKeyboard;
|
||||
};
|
||||
|
||||
#endif
|
||||
// !defined(AFX_Joysstick_Util_H__B422904C_2CEB_495B_B7BD_B45AB30286DD__INCLUDED_)
|
||||
@@ -146,6 +146,14 @@ SSI_STATUS CProto_Util::Initialize()
|
||||
return SSI_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
void CProto_Util::SetOutFile(FILE* pOutFile)
|
||||
{
|
||||
SSI_STATUS Status=SSI_STATUS_NORMAL;
|
||||
UNREFERENCED_PARAMETER(Status);
|
||||
m_pOutFile = pOutFile;
|
||||
};
|
||||
|
||||
|
||||
//******************************************************************************
|
||||
SSI_STATUS CProto_Util::Terminate()
|
||||
{
|
||||
@@ -224,3 +232,204 @@ void CProto_Util::_clear_blanks(char *cBuff)
|
||||
strcpy(cBuff, pBuff);
|
||||
return;
|
||||
};
|
||||
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_Array_Ascii(char *cBuff, char iEP, char *cResult)
|
||||
{
|
||||
int iLen = strlen(cBuff);
|
||||
char cBytes[MAX_BUFF_SIZE];
|
||||
memset(cBytes, 0, MAX_BUFF_SIZE);
|
||||
if (iEP == '2') iLen = (iLen-6)/2;
|
||||
for (int i=0;i<iLen;i++)
|
||||
{
|
||||
sscanf_s((const char *)(cBuff+i*2), "%2x", (cBytes+i));
|
||||
};
|
||||
fprintf(m_pOutFile, cBytes);
|
||||
strcpy(cResult, cBytes);
|
||||
// Build_Mitutoyo_Data_Matrix(cBytes, iEP);
|
||||
return;
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_Array_LONG_MM(char *cBuff, int iLen)
|
||||
{
|
||||
char cLong_array[64][9];
|
||||
long lLong_array[64];
|
||||
double mm;
|
||||
for (int i=0;i<iLen;i++)
|
||||
{
|
||||
memcpy(&(cLong_array[i][0]), cBuff+8*i, 8);
|
||||
sscanf_s(&(cLong_array[i][0]), "%8x", &(lLong_array[i]));
|
||||
mm = lLong_array[i]/(25.4*1000);
|
||||
fprintf(m_pOutFile, "%6.3f ", mm );
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_BYTES(char *cBuff, int iLen)
|
||||
{
|
||||
char x[MAX_BUFF_SIZE];
|
||||
memset(x, 0, MAX_BUFF_SIZE);
|
||||
memcpy(x, cBuff, iLen);
|
||||
fprintf(m_pOutFile, "%s ", x );
|
||||
return;
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
// Dump an array of short INT
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_SHORT_INT(char *cBuff)
|
||||
{
|
||||
char x[5];
|
||||
int iShort;
|
||||
memset(x, 0, 5);
|
||||
x[0] = *(cBuff+2);
|
||||
x[1] = *(cBuff+3);
|
||||
x[2] = *(cBuff+0);
|
||||
x[3] = *(cBuff+1);
|
||||
iShort = HexToInt(x, 4);
|
||||
fprintf(m_pOutFile, "%8i ", iShort );
|
||||
return;
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_Array_BYTE(char *cBuff)
|
||||
{
|
||||
char x[3];
|
||||
memset(x, 0, sizeof(x));
|
||||
memcpy(x, cBuff, 2);
|
||||
fprintf(m_pOutFile, "%s ", x );
|
||||
return;
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_Array_UINT_TO_INCH(char *cBuff, int iLen)
|
||||
{
|
||||
char cLong_array[64][7];
|
||||
long lLong_array[64];
|
||||
for (int i=0;i<iLen;i++)
|
||||
{
|
||||
memcpy(&(cLong_array[i][0]), cBuff+4*i, 4);
|
||||
sscanf_s(&(cLong_array[i][0]), "%4x", &(lLong_array[i]));
|
||||
fprintf(m_pOutFile, "%06.6f ", lLong_array[i]/(25.4 * 1000.0) );
|
||||
};
|
||||
return;
|
||||
};
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_Array_UINT(char *cBuff, int iLen)
|
||||
{
|
||||
char cLong_array[64][7];
|
||||
long lLong_array[64];
|
||||
for (int i=0;i<iLen;i++)
|
||||
{
|
||||
memcpy(&(cLong_array[i][0]), cBuff+4*i, 4);
|
||||
sscanf_s(&(cLong_array[i][0]), "%4x", &(lLong_array[i]));
|
||||
fprintf(m_pOutFile, "%06d ", lLong_array[i] );
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
long CProto_Util::_ascii2long_rev(char *cBuff)
|
||||
{
|
||||
char cLong[9];
|
||||
long lLong;
|
||||
cLong[7] = *cBuff;
|
||||
cLong[6] = *(cBuff+1);
|
||||
cLong[5] = *(cBuff+2);
|
||||
cLong[4] = *(cBuff+3);
|
||||
cLong[3] = *(cBuff+4);
|
||||
cLong[2] = *(cBuff+5);
|
||||
cLong[1] = *(cBuff+6);
|
||||
cLong[0] = *(cBuff+7);
|
||||
sscanf_s(cLong, "%8x", &lLong);
|
||||
return lLong;
|
||||
};
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
void CProto_Util::Dump_Array_LONG_REV(char *cBuff, int iLen)
|
||||
{
|
||||
char cLong[9];
|
||||
long lLong;
|
||||
int _iLen = (iLen>64) ? 64 : iLen; // only process 64 max
|
||||
for (int i=0;i<_iLen;i++)
|
||||
{
|
||||
cLong[6] = *(cBuff+8*i+0);
|
||||
cLong[7] = *(cBuff+8*i+1);
|
||||
cLong[4] = *(cBuff+8*i+2);
|
||||
cLong[5] = *(cBuff+8*i+3);
|
||||
cLong[2] = *(cBuff+8*i+4);
|
||||
cLong[3] = *(cBuff+8*i+5);
|
||||
cLong[0] = *(cBuff+8*i+6);
|
||||
cLong[1] = *(cBuff+8*i+7);
|
||||
sscanf_s(cLong, "%8x", &lLong);
|
||||
fprintf(m_pOutFile, "%08d ", lLong);
|
||||
};
|
||||
return;
|
||||
};
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
//=====================================================================================
|
||||
void CProto_Util::Dump_Array_LONG(char *cBuff, int iLen, int iSize)
|
||||
{
|
||||
char cLong_array[64][9];
|
||||
long lLong_array[64];
|
||||
for (int i=0;i<iLen;i++)
|
||||
{
|
||||
/*
|
||||
if(bSo7)
|
||||
memcpy(&(cLong_array[i][0]), cBuff+6*i, 6);
|
||||
else
|
||||
memcpy(&(cLong_array[i][0]), cBuff+8*i, 8);
|
||||
*/
|
||||
memcpy(&(cLong_array[i][0]), cBuff+iSize*i, iSize);
|
||||
sscanf_s(&(cLong_array[i][0]), "%8x", &(lLong_array[i]));
|
||||
fprintf(m_pOutFile, "%08d ", lLong_array[i] );
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
//===================================================================
|
||||
int CProto_Util::HexToInt(char *Data, int Bytes)
|
||||
{
|
||||
int Byte;
|
||||
int HexChar, Value;
|
||||
|
||||
Value = 0;
|
||||
for( Byte = 0; Byte < Bytes; Byte++ )
|
||||
{
|
||||
Value <<= 4;
|
||||
HexChar = *Data++ -= '0';
|
||||
if( HexChar > 32 )
|
||||
HexChar -= 39;
|
||||
else if( HexChar > 9 )
|
||||
HexChar -= 7;
|
||||
Value += HexChar;
|
||||
}
|
||||
return( Value );
|
||||
}
|
||||
|
||||
//===================================================================
|
||||
const char *CProto_Util::byte_to_binary ( int x )
|
||||
{
|
||||
static char b[9];
|
||||
b[0] = '\0';
|
||||
|
||||
int z;
|
||||
for (z = 256; z > 0; z >>= 1)
|
||||
{
|
||||
strcat(b, ((x & z) == z) ? "1" : "0");
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//
|
||||
// Proto_Util.h: interface for the CDataLink class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -13,76 +14,17 @@
|
||||
#include "logger.h"
|
||||
#include "SsiStatus.h"
|
||||
|
||||
enum SETTLE_STATUS
|
||||
{
|
||||
NOTSETTLED = 0,
|
||||
SETTLED,
|
||||
TIMEDOUT
|
||||
};
|
||||
|
||||
// CSettleStageParams and CSettleStage are copied from QVI, but QVI is based on millionths of and inch
|
||||
// and we will use microns for MV
|
||||
class CSettleStageParams
|
||||
{
|
||||
public:
|
||||
CSettleStageParams()
|
||||
{
|
||||
EDGE_RETRY_TIMEOUT_X = 800;
|
||||
EDGE_RETRY_TIMEOUT_Y = 800;
|
||||
EDGE_RETRY_TIMEOUT_Z = 800;
|
||||
EDGE_RETRY_TIMEOUT_MAG = 800;
|
||||
EDGE_RETRY_BANDWIDTH_X = 1;
|
||||
EDGE_RETRY_BANDWIDTH_Y = 1;
|
||||
EDGE_RETRY_BANDWIDTH_Z = 1;
|
||||
EDGE_RETRY_BANDWIDTH_MAG = 1;
|
||||
EDGE_RETRY_COUNT_X = 1;
|
||||
EDGE_RETRY_COUNT_Y = 1;
|
||||
EDGE_RETRY_COUNT_Z = 1;
|
||||
EDGE_RETRY_COUNT_MAG = 1;
|
||||
};
|
||||
|
||||
long EDGE_RETRY_TIMEOUT_X; //300
|
||||
long EDGE_RETRY_TIMEOUT_Y; //300
|
||||
long EDGE_RETRY_TIMEOUT_Z; //300
|
||||
long EDGE_RETRY_TIMEOUT_MAG; //300
|
||||
long EDGE_RETRY_BANDWIDTH_X; //50
|
||||
long EDGE_RETRY_BANDWIDTH_Y; //50
|
||||
long EDGE_RETRY_BANDWIDTH_Z; //50
|
||||
long EDGE_RETRY_BANDWIDTH_MAG; //50
|
||||
long EDGE_RETRY_COUNT_X; //1
|
||||
long EDGE_RETRY_COUNT_Y; //1
|
||||
long EDGE_RETRY_COUNT_Z; //1
|
||||
long EDGE_RETRY_COUNT_MAG; //1
|
||||
};
|
||||
|
||||
class CSettleStage
|
||||
{
|
||||
public:
|
||||
CSettleStage(long lAxis, double dStartTime, long lStart, long lDeadband, double dTestIncrSec, double dMaxTimeSec);
|
||||
enum SETTLE_STATUS Test(double dCurTime, long lCurPos);
|
||||
|
||||
private:
|
||||
double m_dStartTime;
|
||||
long m_lStartPos;
|
||||
long m_lDeadband;
|
||||
double m_dTestIncrSec;
|
||||
double m_dMaxTimeSec;
|
||||
double m_dIncrStartTimeSec;
|
||||
long m_lAxis;
|
||||
};
|
||||
|
||||
//======================================================================================
|
||||
class CProto_Util
|
||||
{
|
||||
public:
|
||||
|
||||
double ScaleToMM(long lCount, double dResolution);
|
||||
long MMtoScale(double lDistanceMM, double dResolution);
|
||||
|
||||
//
|
||||
CProto_Util();
|
||||
virtual ~CProto_Util();
|
||||
SSI_STATUS Initialize();
|
||||
void SetOutFile(FILE* pOutFile);
|
||||
SSI_STATUS Terminate();
|
||||
SSI_STATUS GetAppPath(CString &Path);
|
||||
SSI_STATUS ExtractAppPath(CString &Path);
|
||||
@@ -97,7 +39,19 @@ public:
|
||||
void _char2bin(unsigned char *cBuff, BYTE *cBytes, int len);
|
||||
void _clear_blanks(char *cBuff);
|
||||
void _ascii2bin(char *cBuff);
|
||||
SSI_STATUS WaitForSettleXYZZM();
|
||||
void Dump_BYTES(char *cBuff, int iLen);
|
||||
void Dump_SHORT_INT(char *cBuff);
|
||||
void Dump_Array_BYTE(char *cBuff);
|
||||
void Dump_Array_UINT(char *cBuff, int iLen);
|
||||
void Dump_Array_UINT_TO_INCH(char *cBuff, int iLen);
|
||||
void Dump_Array_LONG(char *cBuff, int iLen, int iSize);
|
||||
void Dump_Array_LONG_REV(char *cBuff, int iLen);
|
||||
long _ascii2long_rev(char *cBuff);
|
||||
void Dump_Array_Ascii(char *cBuff, char iEP, char *cResult);
|
||||
const char *byte_to_binary ( int x );
|
||||
int HexToInt(char *Data, int Bytes);
|
||||
void Dump_Array_LONG_MM(char *cBuff, int iLen);
|
||||
FILE* m_pOutFile;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@ BEGIN_MESSAGE_MAP(CFileUtilitiesDlg, CDialogEx)
|
||||
ON_BN_CLICKED(IDOK, &CFileUtilitiesDlg::OnBnClickedOk)
|
||||
ON_BN_CLICKED(IDC_BUTTON_BROWSE, &CFileUtilitiesDlg::OnBnClickedButtonBrowse)
|
||||
ON_BN_CLICKED(IDCANCEL, &CFileUtilitiesDlg::OnBnClickedCancel)
|
||||
ON_BN_CLICKED(IDC_RADIO_EXTRACT, &CFileUtilitiesDlg::OnBnClickedRadioExtract)
|
||||
ON_BN_CLICKED(IDC_RADIO_OUT_EXTRACT, &CFileUtilitiesDlg::OnBnClickedRadioExtract)
|
||||
ON_BN_CLICKED(IDC_RADIO_DUMP_BINARY, &CFileUtilitiesDlg::OnBnClickedRadioDumpBinary)
|
||||
ON_BN_CLICKED(IDC_RADIO_HEX_ASCII2BIN, &CFileUtilitiesDlg::OnBnClickedRadioHexAscii2bin)
|
||||
ON_BN_CLICKED(IDC_RADIO_DEDUPE, &CFileUtilitiesDlg::OnBnClickedRadioDedupe)
|
||||
@@ -44,43 +44,48 @@ void CFileUtilitiesDlg::OnBnClickedOk()
|
||||
char _criteria[256];
|
||||
CString _extractString;
|
||||
CMv_File_Utilities *m_FileUtilities = new CMv_File_Utilities();
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_HEX_BIN2ASCII))->GetCheck())
|
||||
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_2BIN))->GetCheck())
|
||||
{
|
||||
m_FileUtilities->BinToHexAscii(&m_csInputFile);
|
||||
}
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DEDUPE))->GetCheck())
|
||||
{
|
||||
m_FileUtilities->DedupeFunction(&m_csInputFile);
|
||||
}
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_HEX_ASCII2BIN))->GetCheck())
|
||||
{
|
||||
}
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DUMP_BINARY))->GetCheck())
|
||||
{
|
||||
m_FileUtilities->DumpBin(&m_csInputFile);
|
||||
}
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_EXTRACT))->GetCheck())
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DUMP_PRS))->GetCheck())
|
||||
{
|
||||
m_FileUtilities->DumpPrs(&m_csInputFile);
|
||||
}
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_OUT_EXTRACT))->GetCheck())
|
||||
{
|
||||
GetDlgItem(IDC_EDIT_CRITERIA)->GetWindowText(_extractString);
|
||||
if (_extractString.GetLength() == 0)
|
||||
{
|
||||
strcpy(_criteria, "Poll");
|
||||
// MessageBox(_T("Null Crtieria, operation exit."), _T("Warning Message"), MB_OK);
|
||||
// MessageBox(_T("Null Criteria, operation exit."), _T("Warning Message"), MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t sConverted;
|
||||
wcstombs_s(&sConverted, _criteria, _extractString.GetLength()+1, _extractString, _TRUNCATE);
|
||||
};
|
||||
m_FileUtilities->ExtractCommand(&m_csInputFile, (char *)_criteria, ((CButton *)GetDlgItem(IDC_CHECK_NEGATE))->GetCheck());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_FileUtilities->ExtractCommand(&m_csInputFile, (char *)_criteria, ((CButton *)GetDlgItem(IDC_CHECK_NEGATE))->GetCheck());
|
||||
};
|
||||
|
||||
MessageBox(_T("Done."), _T("Message"), MB_OK);
|
||||
delete m_FileUtilities;
|
||||
m_FileUtilities=nullptr;
|
||||
// CDialogEx::OnOK();
|
||||
m_FileUtilities = NULL;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@@ -104,10 +109,11 @@ void CFileUtilitiesDlg::OnBnClickedButtonBrowse()
|
||||
//===========================================================================
|
||||
BOOL CFileUtilitiesDlg::OnInitDialog()
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DEDUPE))->SetCheck(1);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DEDUPE))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_HEX_ASCII2BIN))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DUMP_BINARY))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_EXTRACT))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_OUT_EXTRACT))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DUMP_PRS))->SetCheck(1);
|
||||
((CButton *)GetDlgItem(IDC_EDIT_CRITERIA))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_CHECK_NEGATE))->EnableWindow(false);
|
||||
return TRUE;
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
// CKeyenceTM065_Dlg.cpp : implementation file
|
||||
//
|
||||
#include "stdafx.h"
|
||||
#include "KeyenceTM065_Dlg.h"
|
||||
#include "..\..\..\KeyenceTM065\KeyenceTM065_Proto.h"
|
||||
#include "afxdialogex.h"
|
||||
|
||||
extern CKeyenceTM065_Proto *m_pKeyenceTM065_Proto;
|
||||
|
||||
// CKeyenceTM065_Dlg dialog
|
||||
|
||||
IMPLEMENT_DYNAMIC(CKeyenceTM065_Dlg, CDialogEx)
|
||||
|
||||
//============================================================================================
|
||||
CKeyenceTM065_Dlg::CKeyenceTM065_Dlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialogEx(CKeyenceTM065_Dlg::IDD, pParent)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
CKeyenceTM065_Dlg::~CKeyenceTM065_Dlg()
|
||||
{
|
||||
if (m_pKeyenceTM065_Proto)
|
||||
{
|
||||
delete m_pKeyenceTM065_Proto;
|
||||
m_pKeyenceTM065_Proto=NULL;
|
||||
};
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CKeyenceTM065_Dlg, CDialogEx)
|
||||
ON_BN_CLICKED(IDC_BUTTON_START_MACHINE, &CKeyenceTM065_Dlg::OnBnClickedButtonStartMachine)
|
||||
ON_BN_CLICKED(IDC_BUTTON_STOP_MACHINE, &CKeyenceTM065_Dlg::OnBnClickedButtonStopMachine)
|
||||
ON_BN_CLICKED(IDC_BUTTON_INIT_PROGRAM, &CKeyenceTM065_Dlg::OnBnClickedButtonInitProgram)
|
||||
ON_BN_CLICKED(IDC_BUTTON_REPLAY_STARTUP, &CKeyenceTM065_Dlg::OnBnClickedButtonReplayStartup)
|
||||
ON_BN_CLICKED(IDC_BUTTON_READ_ENVIRONMENT, &CKeyenceTM065_Dlg::OnBnClickedButtonReadEnvironment)
|
||||
ON_BN_CLICKED(IDC_BUTTON_WRITE_ENVIRONMENT, &CKeyenceTM065_Dlg::OnBnClickedButtonWriteEnvironment)
|
||||
ON_BN_CLICKED(IDC_BUTTON_READ_PROGRAM, &CKeyenceTM065_Dlg::OnBnClickedButtonReadProgram)
|
||||
ON_BN_CLICKED(IDC_BUTTON_WRITE_PROGRAM, &CKeyenceTM065_Dlg::OnBnClickedButtonWriteProgram)
|
||||
ON_BN_CLICKED(IDC_BUTTON_READ_IMAGE, &CKeyenceTM065_Dlg::OnBnClickedButtonReadImage)
|
||||
ON_BN_CLICKED(IDOK, &CKeyenceTM065_Dlg::OnBnClickedOk)
|
||||
ON_BN_CLICKED(IDCANCEL, &CKeyenceTM065_Dlg::OnBnClickedCancel)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonStartMachine()
|
||||
{
|
||||
m_pKeyenceTM065_Proto = new CKeyenceTM065_Proto();
|
||||
m_pKeyenceTM065_Proto->Init_Keyence();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonStopMachine()
|
||||
{
|
||||
if (m_pKeyenceTM065_Proto)
|
||||
{
|
||||
m_pKeyenceTM065_Proto->_shutdown_machine();
|
||||
m_pKeyenceTM065_Proto->Exit_Keyence();
|
||||
delete m_pKeyenceTM065_Proto;
|
||||
m_pKeyenceTM065_Proto=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonInitProgram()
|
||||
{
|
||||
m_pKeyenceTM065_Proto->_init_program();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonReplayStartup()
|
||||
{
|
||||
CString m_csInputFile;
|
||||
|
||||
if (!m_pKeyenceTM065_Proto)
|
||||
MessageBox( _T("Must start machine before replay capture."), _T("Message"), MB_OK);
|
||||
else
|
||||
{
|
||||
CString strFilters;
|
||||
CString strExt;
|
||||
strFilters = _T("All Files (*.*)|*.*||");
|
||||
strExt = _T("*");
|
||||
CString m_csLogFile = _T("");
|
||||
CString strMsg;
|
||||
CFileDialog fileDlg(TRUE, strExt, (LPCTSTR) m_csLogFile, OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, strFilters, this);
|
||||
if ( fileDlg.DoModal()==IDOK )
|
||||
{
|
||||
m_csInputFile = fileDlg.GetPathName();
|
||||
if (m_pKeyenceTM065_Proto->_replay_capture(m_csInputFile))
|
||||
{
|
||||
MessageBox( _T("Replay Keyence Capture File not found."), _T("Message"), MB_OK);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonReadEnvironment()
|
||||
{
|
||||
m_pKeyenceTM065_Proto->_read_env();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonWriteEnvironment()
|
||||
{
|
||||
m_pKeyenceTM065_Proto->_write_env();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
//
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonReadProgram()
|
||||
{
|
||||
m_pKeyenceTM065_Proto->_get_program();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonWriteProgram()
|
||||
{
|
||||
m_pKeyenceTM065_Proto->_put_program();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonReadImage()
|
||||
{
|
||||
m_pKeyenceTM065_Proto->_get_image();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedOk()
|
||||
{
|
||||
OnBnClickedButtonStopMachine();
|
||||
CDialogEx::OnOK();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedCancel()
|
||||
{
|
||||
OnBnClickedButtonStopMachine();
|
||||
CDialogEx::OnCancel();
|
||||
}
|
||||
|
||||
//============================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonReadPrs()
|
||||
{
|
||||
// Open a file dialog box to dump a PRS file.
|
||||
CString m_PrsFile=_T("Program_00.prs");
|
||||
CString strFilters = _T("All Files (*.*)|*.*||");
|
||||
CString strExt = _T("prs");
|
||||
CFileDialog fileDlg(FALSE,_T("INI"),m_PrsFile,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,strFilters, this);
|
||||
INT_PTR nResult;
|
||||
|
||||
while (true) {
|
||||
nResult = fileDlg.DoModal();
|
||||
if (nResult == IDOK)
|
||||
{
|
||||
m_PrsFile = fileDlg.GetPathName();
|
||||
m_pKeyenceTM065_Proto->_read_prs_file(m_PrsFile);
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//==================================================================================
|
||||
void CKeyenceTM065_Dlg::OnBnClickedButtonDumpPrs()
|
||||
{
|
||||
// TODO: Add your control notification handler code here
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "afxdialogex.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
// CKeyenceTM065_Dlg dialog
|
||||
|
||||
class CKeyenceTM065_Dlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(CKeyenceTM065_Dlg)
|
||||
|
||||
public:
|
||||
CKeyenceTM065_Dlg(CWnd* pParent = NULL); // standard constructor
|
||||
virtual ~CKeyenceTM065_Dlg();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_DIALOG_KEYENCE_DLG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnBnClickedButtonStartMachine();
|
||||
afx_msg void OnBnClickedButtonStopMachine();
|
||||
afx_msg void OnBnClickedButtonInitProgram();
|
||||
afx_msg void OnBnClickedButtonReplayStartup();
|
||||
afx_msg void OnBnClickedButtonReadEnvironment();
|
||||
afx_msg void OnBnClickedButtonWriteEnvironment();
|
||||
afx_msg void OnBnClickedButtonReadProgram();
|
||||
afx_msg void OnBnClickedButtonWriteProgram();
|
||||
afx_msg void OnBnClickedButtonReadImage();
|
||||
afx_msg void OnBnClickedOk();
|
||||
afx_msg void OnBnClickedCancel();
|
||||
afx_msg void OnBnClickedButtonReadPrs();
|
||||
afx_msg void OnBnClickedButtonDumpPrs();
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "StdAfx.h"
|
||||
#include "Mv_File_Utilities.h"
|
||||
#include "..\..\..\KeyenceTM065\KeyenceTM065_Proto.h"
|
||||
|
||||
#define MAX_BUFF_SIZE 1024
|
||||
// ==========================================================================================
|
||||
@@ -140,7 +141,7 @@ CMv_File_Utilities::~CMv_File_Utilities(void)
|
||||
// Read in a buffer. Look for the key. Match one of them.
|
||||
// iFmt = -1 not used.
|
||||
// ==========================================================================================
|
||||
int CMv_File_Utilities::BinToHexAscii(CString *_InFileName)
|
||||
int CMv_File_Utilities::DumpBin(CString *_InFileName)
|
||||
{
|
||||
FILE* pInFile;
|
||||
FILE* pOutFile;
|
||||
@@ -179,8 +180,159 @@ int CMv_File_Utilities::BinToHexAscii(CString *_InFileName)
|
||||
|
||||
fclose(pInFile);
|
||||
fclose(pOutFile);
|
||||
|
||||
free(fBuff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ==========================================================================================
|
||||
// Read the entire file. It should be 41K
|
||||
//
|
||||
#define MAX_PRS_SIZE 65000
|
||||
|
||||
int CMv_File_Utilities::DumpPrs(CString *_InFileName)
|
||||
{
|
||||
FILE* pInFile;
|
||||
FILE* pOutFile;
|
||||
int bytes_read = 0;
|
||||
TM_PRS_BUFF *TM_Buff;
|
||||
char cName[64];
|
||||
|
||||
CString OutFileName = *_InFileName + _T("_PRS.txt");
|
||||
_wfopen_s(&pOutFile, OutFileName, _T("wt"));
|
||||
if (!pOutFile)
|
||||
return -1;
|
||||
_wfopen_s(&pInFile, *_InFileName, _T("rb"));
|
||||
if (!pInFile)
|
||||
{
|
||||
fprintf(pOutFile, "%s not found.\n", _InFileName);
|
||||
fclose(pOutFile);
|
||||
return(-1);
|
||||
};
|
||||
|
||||
TM_Buff = (TM_PRS_BUFF *)malloc(MAX_PRS_SIZE);
|
||||
memset((char *)TM_Buff, 0, MAX_PRS_SIZE);
|
||||
bytes_read = fread((char *)TM_Buff, 1, MAX_PRS_SIZE, pInFile);
|
||||
if (bytes_read > 0)
|
||||
{
|
||||
memset(cName, 0, 64);
|
||||
memcpy(cName, TM_Buff->_tm_hdr._tm_name, 20);
|
||||
fprintf(pOutFile, "%s\r", cName);
|
||||
fprintf(pOutFile, "%2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_hdr._tm_id[0], TM_Buff->_tm_hdr._tm_id[1], TM_Buff->_tm_hdr._tm_id[2], TM_Buff->_tm_hdr._tm_id[3]);
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
fprintf(pOutFile, "\rProgram Pid - %8.8X\r", i);
|
||||
fprintf(pOutFile, "%2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._pid[0], TM_Buff->_tm_prs[i]._pid[1], TM_Buff->_tm_prs[i]._pid[2], TM_Buff->_tm_prs[i]._pid[3]);
|
||||
fprintf(pOutFile, "%8.8X\r", TM_Buff->_tm_prs[i]._nbr);
|
||||
memset(cName, 0, 64);
|
||||
memcpy(cName, TM_Buff->_tm_prs[i]._name, 16);
|
||||
fprintf(pOutFile, "%s\r", cName);
|
||||
fprintf(pOutFile, "trig mode: %2.2X int prev:%2.2X trig rate:%2.2X unk1:%2.2X\r", TM_Buff->_tm_prs[i]._trigger_mode, TM_Buff->_tm_prs[i]._int_prevention, TM_Buff->_tm_prs[i]._trigger_rate, TM_Buff->_tm_prs[i]._unk1);
|
||||
fprintf(pOutFile, "%2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._unk2[0], TM_Buff->_tm_prs[i]._unk2[1], TM_Buff->_tm_prs[i]._unk2[2], TM_Buff->_tm_prs[i]._unk2[3]);
|
||||
for (int k=0; k<2; k++) // head A and B
|
||||
{
|
||||
fprintf(pOutFile, " Head - %i\r", k);
|
||||
fprintf(pOutFile, " x_meas_range:%2.2i y_meas_range:%2.2i _threshold:%2.2i _unk1:%2.2i\r", TM_Buff->_tm_prs[i]._tm_head[k]._x_measure_range, TM_Buff->_tm_prs[i]._tm_head[k]._y_measure_range, TM_Buff->_tm_prs[i]._tm_head[k]._threshold, TM_Buff->_tm_prs[i]._tm_head[k]._unk1);
|
||||
for (int j=0; j<5; j++)
|
||||
{
|
||||
fprintf(pOutFile, " Mask - %i", j);
|
||||
fprintf(pOutFile, " %2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_type[0], TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_type[1], TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_type[2], TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_type[3]);
|
||||
fprintf(pOutFile, " x1:%4.4i y1:%4.4i x2:%4.4i y2:%4.4i x3:%4.4i y3:%4.4i\r", TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_x1, TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_y1, TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_x2, TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_y2, TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_x3, TM_Buff->_tm_prs[i]._tm_head[k]._tm_mask[j]._mk_y3);
|
||||
}
|
||||
}
|
||||
fprintf(pOutFile, " %2.2X%2.2X%2.2X%2.2X ", TM_Buff->_tm_prs[i]._unk3[0], TM_Buff->_tm_prs[i]._unk3[1], TM_Buff->_tm_prs[i]._unk3[2], TM_Buff->_tm_prs[i]._unk3[3]);
|
||||
fprintf(pOutFile, " %2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._unk4[0], TM_Buff->_tm_prs[i]._unk4[1], TM_Buff->_tm_prs[i]._unk4[2], TM_Buff->_tm_prs[i]._unk4[3]);
|
||||
for (int k=0; k<2; k++)
|
||||
{
|
||||
fprintf(pOutFile, " TM_CORR %2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._tm_head_corr[k]._unk1[0], TM_Buff->_tm_prs[i]._tm_head_corr[k]._unk1[1], TM_Buff->_tm_prs[i]._tm_head_corr[k]._unk1[2], TM_Buff->_tm_prs[i]._tm_head_corr[k]._unk1[3]);
|
||||
fprintf(pOutFile, " _i1:%4.4i _i2:%4.4i _i3:%4.4i _i4:%4.4i\r", TM_Buff->_tm_prs[i]._tm_head_corr[k]._i1, TM_Buff->_tm_prs[i]._tm_head_corr[k]._i2, TM_Buff->_tm_prs[i]._tm_head_corr[k]._i3, TM_Buff->_tm_prs[i]._tm_head_corr[k]._i4);
|
||||
};
|
||||
for (int k=0; k<2; k++)
|
||||
{
|
||||
fprintf(pOutFile, " TM_CORR1 img_reg:%2.2X src_speed:%2.2X src_ang:%2.2X corr_value:%2.2X ", TM_Buff->_tm_prs[i]._tm_head_corr1[k]._img_reg, TM_Buff->_tm_prs[i]._tm_head_corr1[k]._img_src_speed, TM_Buff->_tm_prs[i]._tm_head_corr1[k]._img_src_ang, TM_Buff->_tm_prs[i]._tm_head_corr1[k]._img_corr_val);
|
||||
fprintf(pOutFile, " %2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._tm_head_corr1[k]._unk4[0], TM_Buff->_tm_prs[i]._tm_head_corr1[k]._unk4[1], TM_Buff->_tm_prs[i]._tm_head_corr1[k]._unk4[2], TM_Buff->_tm_prs[i]._tm_head_corr1[k]._unk4[3]);
|
||||
fprintf(pOutFile, " i:");
|
||||
for (int j=0; j<12; j++)
|
||||
{
|
||||
fprintf(pOutFile, "%4.4i ", TM_Buff->_tm_prs[i]._tm_head_corr1[k]._i[j]);
|
||||
};
|
||||
fprintf(pOutFile, "\r");
|
||||
fprintf(pOutFile, " _i1:%4.4i %4.4i %4.4i %4.4i\r", TM_Buff->_tm_prs[i]._tm_head_corr1[k]._i1[0], TM_Buff->_tm_prs[i]._tm_head_corr1[k]._i1[1], TM_Buff->_tm_prs[i]._tm_head_corr1[k]._i1[2], TM_Buff->_tm_prs[i]._tm_head_corr1[k]._i1[3]);
|
||||
};
|
||||
|
||||
fprintf(pOutFile, " meas_type:%2.2X unk:%2.2X a+b:%2.2X unk:%2.2X\r", TM_Buff->_tm_prs[i]._meas_type, TM_Buff->_tm_prs[i]._unk_type_1, TM_Buff->_tm_prs[i]._a_b_calculation, TM_Buff->_tm_prs[i]._unk_type_3);
|
||||
fprintf(pOutFile, " meas_type1:%2.2X%2.2X%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._unk11[0], TM_Buff->_tm_prs[i]._unk11[1], TM_Buff->_tm_prs[i]._unk11[2], TM_Buff->_tm_prs[i]._unk11[3]);
|
||||
fprintf(pOutFile, " x1:%4.4i y1:%4.4i x2:%4.4i y2:%4.4i\r", TM_Buff->_tm_prs[i]._x1, TM_Buff->_tm_prs[i]._y1, TM_Buff->_tm_prs[i]._x2, TM_Buff->_tm_prs[i]._y2);
|
||||
|
||||
for (int k=0; k<16; k++)
|
||||
{
|
||||
memset(cName, 0, sizeof(cName));
|
||||
memcpy(cName, TM_Buff->_tm_prs[i]._tm_out[k]._out_name, 20);
|
||||
fprintf(pOutFile, " out:%s ", cName);
|
||||
fprintf(pOutFile, "%2.2X%2.2X%2.2X%2.2X ", TM_Buff->_tm_prs[i]._tm_out[k]._unk1[0], TM_Buff->_tm_prs[i]._tm_out[k]._unk1[1], TM_Buff->_tm_prs[i]._tm_out[k]._unk1[2], TM_Buff->_tm_prs[i]._tm_out[k]._unk1[3]);
|
||||
fprintf(pOutFile, "ave_meas:%2.2X ", TM_Buff->_tm_prs[i]._tm_out[k]._ave_meas);
|
||||
fprintf(pOutFile, "alarm:%2.2X ", TM_Buff->_tm_prs[i]._tm_out[k]._alarm);
|
||||
fprintf(pOutFile, "meas_mode:%2.2X ", TM_Buff->_tm_prs[i]._tm_out[k]._meas_mode);
|
||||
fprintf(pOutFile, "_unk:%2.2X ", TM_Buff->_tm_prs[i]._tm_out[k]._min_disp_unit);
|
||||
fprintf(pOutFile, "_meas_input_1_v1:%8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._meas_input_1_v1);
|
||||
fprintf(pOutFile, "_meas_input_1_d1:%8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._meas_input_1_d1);
|
||||
fprintf(pOutFile, "_meas_input_2_v2:%8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._meas_input_2_v2);
|
||||
fprintf(pOutFile, "_meas_input_2_d2:%8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._meas_input_2_d2);
|
||||
fprintf(pOutFile, "unk:%8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._unk_scale6);
|
||||
fprintf(pOutFile, "unk:%8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._unk_scale7);
|
||||
fprintf(pOutFile, "off: %8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._offset);
|
||||
fprintf(pOutFile, "up_tol: %8.8ld ", TM_Buff->_tm_prs[i]._tm_out[k]._tol_upper_limit);
|
||||
fprintf(pOutFile, "lo_tol: %8.8ld\r", TM_Buff->_tm_prs[i]._tm_out[k]._tol_lower_limit);
|
||||
}
|
||||
|
||||
fprintf(pOutFile, "Timing Term: ");
|
||||
for (int j=0; j<16; j++)
|
||||
{
|
||||
fprintf(pOutFile, "%2.2X ", TM_Buff->_tm_prs[i]._tm_timing_term_byte[j]);
|
||||
};
|
||||
fprintf(pOutFile, "\r");
|
||||
|
||||
fprintf(pOutFile, " Zero Term: ");
|
||||
for (int j=0; j<16; j++)
|
||||
{
|
||||
fprintf(pOutFile, "%2.2X ", TM_Buff->_tm_prs[i]._tm_zero_term_byte[j]);
|
||||
};
|
||||
|
||||
fprintf(pOutFile, "\r");
|
||||
fprintf(pOutFile, " Bin Out: ");
|
||||
for (int j=0; j<16; j++)
|
||||
{
|
||||
fprintf(pOutFile, "%2.2X ", TM_Buff->_tm_prs[i]._tm_binary_output_byte[j]);
|
||||
}
|
||||
|
||||
fprintf(pOutFile, "\r");
|
||||
fprintf(pOutFile, "%2.2X%2.2X%2.2X%2.2X ", TM_Buff->_tm_prs[i]._unk_flag[0], TM_Buff->_tm_prs[i]._unk_flag[1], TM_Buff->_tm_prs[i]._unk_flag[2], TM_Buff->_tm_prs[i]._unk_flag[3]);
|
||||
|
||||
fprintf(pOutFile, "\r");
|
||||
fprintf(pOutFile, "analog1:meas_val1:%8.8ld out_volt1:%8.8ld meas_val2:%8.8ld out_volt2:%8.8ld\r", TM_Buff->_tm_prs[i]._tm_analog[0]._meas_val_1, TM_Buff->_tm_prs[i]._tm_analog[0]._output_voltage_1, TM_Buff->_tm_prs[i]._tm_analog[0]._meas_val_2, TM_Buff->_tm_prs[i]._tm_analog[0]._output_voltage_2);
|
||||
fprintf(pOutFile, "analog2:meas_val1:%8.8ld out_volt1:%8.8ld meas_val2:%8.8ld out_volt2:%8.8ld\r", TM_Buff->_tm_prs[i]._tm_analog[1]._meas_val_1, TM_Buff->_tm_prs[i]._tm_analog[1]._output_voltage_1, TM_Buff->_tm_prs[i]._tm_analog[1]._meas_val_2, TM_Buff->_tm_prs[i]._tm_analog[1]._output_voltage_2);
|
||||
|
||||
fprintf(pOutFile, "\r");
|
||||
fprintf(pOutFile, "_storage:%2.2X ", TM_Buff->_tm_prs[i]._storage);
|
||||
fprintf(pOutFile, "_image_storage_head:%2.2X ", TM_Buff->_tm_prs[i]._image_storage_head);
|
||||
fprintf(pOutFile, "_image_storage_mode:%2.2X ", TM_Buff->_tm_prs[i]._image_storage_mode);
|
||||
fprintf(pOutFile, "_unk_flags1: %2.2X ", TM_Buff->_tm_prs[i]._unk_flag11);
|
||||
|
||||
fprintf(pOutFile, "_image_storage_data_pts:%2.2X ", TM_Buff->_tm_prs[i]._image_storage_no_data_pts);
|
||||
fprintf(pOutFile, "_image_storage_skipping:%2.2X ", TM_Buff->_tm_prs[i]._image_storage_skipping);
|
||||
fprintf(pOutFile, "_unk_flags2:%2.2X%2.2X\r", TM_Buff->_tm_prs[i]._unk_flags2[0], TM_Buff->_tm_prs[i]._unk_flags2[1]);
|
||||
fprintf(pOutFile, " auto_send:");
|
||||
for (int j=0; j<16; j++)
|
||||
{
|
||||
fprintf(pOutFile, "%2.2X ", TM_Buff->_tm_prs[i]._auto_send[j]);
|
||||
};
|
||||
fprintf(pOutFile, "\r");
|
||||
fprintf(pOutFile, "_data_out_timing:%2.2X ", TM_Buff->_tm_prs[i]._data_out_timing);
|
||||
fprintf(pOutFile, "_unk_flags3:%2.2X %2.2X %2.2X ", TM_Buff->_tm_prs[i]._unk_flags3[0], TM_Buff->_tm_prs[i]._unk_flags3[1], TM_Buff->_tm_prs[i]._unk_flags3[2]);
|
||||
fprintf(pOutFile, "Checksum?:%8.8X %8.8ld \r", TM_Buff->_tm_prs[i]._checksum, TM_Buff->_tm_prs[i]._checksum);
|
||||
}
|
||||
};
|
||||
fclose(pInFile);
|
||||
fclose(pOutFile);
|
||||
free((char *) TM_Buff);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ class CMv_File_Utilities
|
||||
public:
|
||||
CMv_File_Utilities(void);
|
||||
~CMv_File_Utilities(void);
|
||||
int BinToHexAscii(CString* InFileName);
|
||||
int DumpBin(CString* InFileName);
|
||||
int DedupeFunction(CString* InFileName);
|
||||
int ExtractCommand(CString* InFileName, char *_criteriaString, int bNegate);
|
||||
int DumpPrs(CString *_InFileName);
|
||||
};
|
||||
|
||||
@@ -17,16 +17,15 @@
|
||||
#include "SO7_UtilDlg.h"
|
||||
#include "So7_Option.h"
|
||||
#include "Mv_MainDlg.h"
|
||||
#include "KeyenceTM065_Dlg.h"
|
||||
|
||||
CMv_Proto* m_pMv_Proto =NULL;
|
||||
SmartMotor_Proto* pSmartMotor_Proto=NULL;
|
||||
|
||||
|
||||
// CMv_MainDlg dialog
|
||||
CMv_Proto *m_pMv_Proto = NULL;
|
||||
CKeyenceTM065_Proto *m_pKeyenceTM065_Proto = NULL;
|
||||
SmartMotor_Proto *pSmartMotor_Proto = NULL;
|
||||
|
||||
IMPLEMENT_DYNAMIC(CMv_MainDlg, CDialogEx)
|
||||
|
||||
CMv_MainDlg::CMv_MainDlg(CWnd* pParent /*=NULL*/)
|
||||
CMv_MainDlg::CMv_MainDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialogEx(CMv_MainDlg::IDD, pParent)
|
||||
{
|
||||
}
|
||||
@@ -41,22 +40,11 @@ void CMv_MainDlg::DoDataExchange(CDataExchange* pDX)
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMv_MainDlg, CDialogEx)
|
||||
ON_BN_CLICKED(IDC_BUTTON_DIAGNOSTICS, &CMv_MainDlg::OnBnClickedButtonDiagnostics)
|
||||
ON_BN_CLICKED(IDC_BUTTON_AUTO_TEST, &CMv_MainDlg::OnBnClickedButtonAutoTest)
|
||||
ON_BN_CLICKED(IDC_BUTTON_PROTOCOL_ANALYZER, &CMv_MainDlg::OnBnClickedButtonProtocolAnalyzerDlg)
|
||||
ON_BN_CLICKED(IDC_BUTTON_REPLAY_STARTUP, &CMv_MainDlg::OnBnClickedButtonReplayStartup)
|
||||
ON_BN_CLICKED(IDOK, &CMv_MainDlg::OnBnClickedOk)
|
||||
ON_BN_CLICKED(IDC_BUTTON_START_CAPTURE, &CMv_MainDlg::OnBnClickedButtonStartCapture)
|
||||
ON_BN_CLICKED(IDC_RADIO_DATA_CAPTURE_MODE, &CMv_MainDlg::OnBnClickedRadioDataCaptureMode)
|
||||
ON_BN_CLICKED(IDC_RADIO_ENGINEERING_MODE, &CMv_MainDlg::OnBnClickedRadioEngineering)
|
||||
ON_BN_CLICKED(IDC_RADIO_DEMO_MODE, &CMv_MainDlg::OnBnClickedRadioDemoMode)
|
||||
ON_BN_CLICKED(IDC_BUTTON_FILE_UTILITIES, &CMv_MainDlg::OnBnClickedButtonFileUtilities)
|
||||
ON_BN_CLICKED(IDC_RADIO_MACHINE_MICROVU, &CMv_MainDlg::OnBnClickedRadioMachineMicrovu)
|
||||
ON_BN_CLICKED(IDC_RADIO_MACHINE_MITUTOYO, &CMv_MainDlg::OnBnClickedRadioMachineMitutoyo)
|
||||
ON_BN_CLICKED(IDC_BUTTON_CREATE_CONFIG, &CMv_MainDlg::OnBnClickedButtonCreateConfig)
|
||||
ON_BN_CLICKED(IDC_RADIO_MACHINE_SevenOcean, &CMv_MainDlg::OnBnClickedRadioMachineSevenocean)
|
||||
ON_BN_CLICKED(IDC_RADIO_MACHINE_GENERIC, &CMv_MainDlg::OnBnClickedRadioMachineGeneric)
|
||||
ON_BN_CLICKED(IDC_RADIO_MACHINE_ANIMATICS, &CMv_MainDlg::OnBnClickedRadioAnimatics)
|
||||
ON_BN_CLICKED(IDC_BUTTON_DIAGNOSTICS, &CMv_MainDlg::OnBnClickedButtonDiagnostics)
|
||||
ON_BN_CLICKED(IDC_BUTTON_AUTO_TEST, &CMv_MainDlg::OnBnClickedButtonAutoTest)
|
||||
ON_BN_CLICKED(IDC_BUTTON_PROTOCOL_ANALYZER, &CMv_MainDlg::OnBnClickedButtonProtocolAnalyzerDlg)
|
||||
ON_BN_CLICKED(IDOK, &CMv_MainDlg::OnBnClickedOk)
|
||||
ON_BN_CLICKED(IDC_BUTTON_FILE_UTILITIES, &CMv_MainDlg::OnBnClickedButtonFileUtilities)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//===========================================================================
|
||||
@@ -79,456 +67,147 @@ void CMv_MainDlg::OnBnClickedButtonDiagnostics()
|
||||
delete pSo7_Option;
|
||||
pSo7_Option=nullptr;
|
||||
}
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_ANIMATICS))->GetCheck())
|
||||
{
|
||||
if(!pSmartMotor_Proto)
|
||||
{
|
||||
pSmartMotor_Proto=new SmartMotor_Proto();
|
||||
}
|
||||
AnimaticsUtilityDlg* pAnimaticsDlg =new AnimaticsUtilityDlg();
|
||||
pAnimaticsDlg->DoModal();
|
||||
delete pAnimaticsDlg;
|
||||
pAnimaticsDlg=nullptr;
|
||||
if(pSmartMotor_Proto)
|
||||
{
|
||||
delete pSmartMotor_Proto;
|
||||
pSmartMotor_Proto=nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_ANIMATICS))->GetCheck())
|
||||
{
|
||||
if(!pSmartMotor_Proto)
|
||||
{
|
||||
pSmartMotor_Proto=new SmartMotor_Proto();
|
||||
}
|
||||
AnimaticsUtilityDlg* pAnimaticsDlg =new AnimaticsUtilityDlg();
|
||||
pAnimaticsDlg->DoModal();
|
||||
delete pAnimaticsDlg;
|
||||
pAnimaticsDlg=nullptr;
|
||||
if(pSmartMotor_Proto)
|
||||
{
|
||||
delete pSmartMotor_Proto;
|
||||
pSmartMotor_Proto=nullptr;
|
||||
}
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_TM_065))->GetCheck())
|
||||
{
|
||||
CKeyenceTM065_Dlg* pCKeyenceTM065_Dlg = new CKeyenceTM065_Dlg();
|
||||
pCKeyenceTM065_Dlg->DoModal();
|
||||
delete pCKeyenceTM065_Dlg;
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_SevenOcean))->GetCheck())
|
||||
{
|
||||
CSo7_Option* pSo7_Option_Dlg = new CSo7_Option();
|
||||
pSo7_Option_Dlg->DoModal();
|
||||
delete pSo7_Option_Dlg;
|
||||
};
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
void CMv_MainDlg::OnBnClickedButtonAutoTest()
|
||||
{
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->GetCheck())
|
||||
{
|
||||
m_pMv_Proto = new CMv_Proto();
|
||||
CMv_AutoTestDlg* pMv_AutoTestDlg = new CMv_AutoTestDlg();
|
||||
pMv_AutoTestDlg->DoModal();
|
||||
delete pMv_AutoTestDlg;
|
||||
delete m_pMv_Proto;
|
||||
m_pMv_Proto=NULL;
|
||||
};
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->GetCheck())
|
||||
{
|
||||
m_pMv_Proto = new CMv_Proto();
|
||||
CMv_AutoTestDlg* pMv_AutoTestDlg = new CMv_AutoTestDlg();
|
||||
pMv_AutoTestDlg->DoModal();
|
||||
delete pMv_AutoTestDlg;
|
||||
delete m_pMv_Proto;
|
||||
m_pMv_Proto=NULL;
|
||||
}
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_TM_065))->GetCheck())
|
||||
{
|
||||
m_pKeyenceTM065_Proto = new CKeyenceTM065_Proto();
|
||||
CMv_AutoTestDlg* pMv_AutoTestDlg = new CMv_AutoTestDlg();
|
||||
pMv_AutoTestDlg->DoModal();
|
||||
delete pMv_AutoTestDlg;
|
||||
delete m_pMv_Proto;
|
||||
m_pMv_Proto=NULL;
|
||||
};
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// pMv_ProtocolAnalyzerDlg->m_machine = 0; MicroVu
|
||||
// pMv_ProtocolAnalyzerDlg->m_machine = 1; Mitutoyo
|
||||
//===========================================================================
|
||||
void CMv_MainDlg::OnBnClickedButtonProtocolAnalyzerDlg()
|
||||
{
|
||||
CMv_ProtocolAnalyzerDlg* pMv_ProtocolAnalyzerDlg = new CMv_ProtocolAnalyzerDlg();
|
||||
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->GetCheck())
|
||||
pMv_ProtocolAnalyzerDlg->m_machine = 2;
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->GetCheck())
|
||||
pMv_ProtocolAnalyzerDlg->m_machine = 1;
|
||||
else
|
||||
pMv_ProtocolAnalyzerDlg->m_machine = 0; // Generic
|
||||
pMv_ProtocolAnalyzerDlg->DoModal();
|
||||
delete pMv_ProtocolAnalyzerDlg;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// DeviceID = "VID_0D26&PID_1001" - MicroVu
|
||||
// DeviceID = "VID_0fe7&PID_2004" - Mitutoyo
|
||||
//===========================================================================
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
void CMv_MainDlg::OnBnClickedButtonReplayStartup()
|
||||
{
|
||||
CString strFilters;
|
||||
CString strExt;
|
||||
strFilters = _T("Replay Data (*.annotated.proto.txt)|*.annotated.proto.txt|All Files (*.*)|*.*||");
|
||||
strExt = _T(".txt");
|
||||
m_csLogFile = "Replay.Txt";
|
||||
CString strMsg;
|
||||
CFileDialog fileDlg(TRUE, strExt, (LPCTSTR) m_csLogFile, OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, strFilters, this);
|
||||
if ( fileDlg.DoModal ()==IDOK )
|
||||
{
|
||||
m_csReplayFile = fileDlg.GetPathName();
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->GetCheck())
|
||||
{
|
||||
if (!m_pMv_Proto)
|
||||
m_pMv_Proto = new CMv_Proto();
|
||||
m_pMv_Proto->Init_MvUsb();
|
||||
m_pMv_Proto->_start_machine();
|
||||
m_pMv_Proto->_get_xyz_index();
|
||||
m_pMv_Proto->_poll_machine_59();
|
||||
m_pMv_Proto->mv_motion_Dcc_Home();
|
||||
if (m_pMv_Proto->_replay_capture(m_csReplayFile))
|
||||
{
|
||||
MessageBox( _T("Replay MicroVu Capture File not found."), _T("Message"), MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox( _T("Replay MicroVu Capture File Done."), _T("Message"), MB_OK);
|
||||
};
|
||||
m_pMv_Proto->_shutdown_machine();
|
||||
m_pMv_Proto->Exit_MvUsb();
|
||||
delete m_pMv_Proto;
|
||||
}
|
||||
};
|
||||
CMv_ProtocolAnalyzerDlg* pMv_ProtocolAnalyzerDlg = new CMv_ProtocolAnalyzerDlg();
|
||||
pMv_ProtocolAnalyzerDlg->DoModal();
|
||||
delete pMv_ProtocolAnalyzerDlg;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
void CMv_MainDlg::OnBnClickedOk()
|
||||
{
|
||||
CDialogEx::OnOK();
|
||||
CDialogEx::OnOK();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
BOOL CMv_MainDlg::OnInitDialog()
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->SetCheck(false);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->SetCheck(false);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_SevenOcean))->SetCheck(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_ANIMATICS))->SetCheck(false);
|
||||
|
||||
((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->SetCheck(true);
|
||||
OnBnClickedRadioEngineering();
|
||||
OnBnClickedRadioMachineMitutoyo();
|
||||
return TRUE;
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->SetCheck(false);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->SetCheck(false);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_SevenOcean))->SetCheck(false);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_TM_065))->SetCheck(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_ANIMATICS))->SetCheck(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_PROTOCOL_ANALYZER))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_FILE_UTILITIES))->EnableWindow(true);
|
||||
return TRUE;
|
||||
};
|
||||
|
||||
|
||||
//===========================================================================
|
||||
/*
|
||||
void CMv_MainDlg::OnBnClickedButtonStartCapture()
|
||||
{
|
||||
STARTUPINFO m_si;
|
||||
PROCESS_INFORMATION m_pi;
|
||||
ZeroMemory(&m_si, sizeof(m_si));
|
||||
m_si.cb = sizeof(m_si);
|
||||
ZeroMemory(&m_pi, sizeof(m_pi));
|
||||
DWORD dwExitCode = 0;
|
||||
int x;
|
||||
LPTSTR szCmdline = _tcsdup(TEXT("SniffUSB.exe"));
|
||||
if (!CreateProcess(NULL,
|
||||
szCmdline,
|
||||
NULL,
|
||||
NULL,
|
||||
FALSE,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
&m_si,
|
||||
&m_pi)
|
||||
)
|
||||
{
|
||||
x = GetLastError();
|
||||
return;
|
||||
};
|
||||
dwExitCode = ::WaitForSingleObject(m_pi.hProcess, INFINITE);
|
||||
CloseHandle( m_pi.hProcess );
|
||||
CloseHandle( m_pi.hThread );
|
||||
free( szCmdline );
|
||||
STARTUPINFO m_si;
|
||||
PROCESS_INFORMATION m_pi;
|
||||
ZeroMemory(&m_si, sizeof(m_si));
|
||||
m_si.cb = sizeof(m_si);
|
||||
ZeroMemory(&m_pi, sizeof(m_pi));
|
||||
DWORD dwExitCode = 0;
|
||||
int x;
|
||||
LPTSTR szCmdline = _tcsdup(TEXT("SniffUSB.exe"));
|
||||
if (!CreateProcess(NULL,
|
||||
szCmdline,
|
||||
NULL,
|
||||
NULL,
|
||||
FALSE,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
&m_si,
|
||||
&m_pi)
|
||||
)
|
||||
{
|
||||
x = GetLastError();
|
||||
return;
|
||||
};
|
||||
dwExitCode = ::WaitForSingleObject(m_pi.hProcess, INFINITE);
|
||||
CloseHandle( m_pi.hProcess );
|
||||
CloseHandle( m_pi.hThread );
|
||||
free( szCmdline );
|
||||
|
||||
//=================================================================================
|
||||
// Copy the UsbSnoopy.Log to a special location.
|
||||
//=================================================================================
|
||||
CString strDestFileName;
|
||||
CString strFilters;
|
||||
CString strExt;
|
||||
strFilters = _T("All Files (*.*)|*.*||");
|
||||
strExt = _T("Log");
|
||||
strDestFileName = "UsbSnoop_Destination.Log";
|
||||
CFileDialog fileDlg(TRUE, strExt, (LPCTSTR) strDestFileName, OFN_HIDEREADONLY, strFilters, this);
|
||||
if ( fileDlg.DoModal ()==IDOK )
|
||||
{
|
||||
strDestFileName = fileDlg.GetPathName();
|
||||
}
|
||||
delete fileDlg;
|
||||
BOOL bFailIfExists = false;
|
||||
CString strSourceFileName = _T("c:\\windows\\usbsnoop.log");
|
||||
CopyFile(strSourceFileName, strDestFileName, bFailIfExists);
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
void CMv_MainDlg::OnBnClickedRadioDataCaptureMode()
|
||||
CString strDestFileName;
|
||||
CString strFilters;
|
||||
CString strExt;
|
||||
strFilters = _T("All Files (*.*)|*.*||");
|
||||
strExt = _T("Log");
|
||||
strDestFileName = "UsbSnoop_Destination.Log";
|
||||
CFileDialog fileDlg(TRUE, strExt, (LPCTSTR) strDestFileName, OFN_HIDEREADONLY, strFilters, this);
|
||||
if ( fileDlg.DoModal ()==IDOK )
|
||||
{
|
||||
if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_SevenOcean))->GetCheck())
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
|
||||
}
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_ANIMATICS))->GetCheck())
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(true);
|
||||
}
|
||||
|
||||
strDestFileName = fileDlg.GetPathName();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
void CMv_MainDlg::OnBnClickedRadioEngineering()
|
||||
{
|
||||
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->GetCheck())
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DEMO_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
}
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_SevenOcean))->GetCheck())
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
|
||||
}
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_ANIMATICS))->GetCheck())
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DEMO_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(true);
|
||||
};
|
||||
};
|
||||
|
||||
//=================================================================================
|
||||
void CMv_MainDlg::OnBnClickedRadioDemoMode()
|
||||
{
|
||||
if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_SevenOcean))->GetCheck())
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_FILE_UTILITIES))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
|
||||
}
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_MACHINE_ANIMATICS))->GetCheck())
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_AUTO_TEST))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_AUTO_TEST))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_DIAGNOSTICS))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_DIAGNOSTICS))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_REPLAY_STARTUP))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_REPLAY))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_START_CAPTURE))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_COLLECTS_TEXT))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_DEMO_MODE))->EnableWindow(true);
|
||||
}
|
||||
delete fileDlg;
|
||||
BOOL bFailIfExists = false;
|
||||
CString strSourceFileName = _T("c:\\windows\\usbsnoop.log");
|
||||
CopyFile(strSourceFileName, strDestFileName, bFailIfExists);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
//=================================================================================
|
||||
void CMv_MainDlg::OnBnClickedButtonFileUtilities()
|
||||
{
|
||||
CFileUtilitiesDlg* pMv_FileUtilitiesDlg = new CFileUtilitiesDlg();
|
||||
pMv_FileUtilitiesDlg->DoModal();
|
||||
delete pMv_FileUtilitiesDlg;
|
||||
CFileUtilitiesDlg* pMv_FileUtilitiesDlg = new CFileUtilitiesDlg();
|
||||
pMv_FileUtilitiesDlg->DoModal();
|
||||
delete pMv_FileUtilitiesDlg;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
void CMv_MainDlg::OnBnClickedRadioMachineMicrovu()
|
||||
{
|
||||
if (!m_pMv_Proto)
|
||||
m_pMv_Proto = new CMv_Proto();
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioDataCaptureMode();
|
||||
} else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioEngineering();
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(true);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(true);
|
||||
} else
|
||||
{ // Demo Mode
|
||||
OnBnClickedRadioDemoMode();
|
||||
}
|
||||
if (m_pMv_Proto)
|
||||
{
|
||||
delete m_pMv_Proto;
|
||||
m_pMv_Proto=nullptr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
void CMv_MainDlg::OnBnClickedRadioMachineMitutoyo()
|
||||
{
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioDataCaptureMode();
|
||||
} else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioEngineering();
|
||||
((CButton *)GetDlgItem(IDC_STATIC_MV_CONFIG))->EnableWindow(false);
|
||||
((CButton *)GetDlgItem(IDC_BUTTON_CREATE_CONFIG))->EnableWindow(false);
|
||||
} else
|
||||
{ // Demo Mode
|
||||
OnBnClickedRadioDemoMode();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
void CMv_MainDlg::OnBnClickedButtonCreateConfig()
|
||||
{
|
||||
CCaptureDataDlg* pCaptureDataDlg = new CCaptureDataDlg();
|
||||
pCaptureDataDlg->DoModal();
|
||||
delete pCaptureDataDlg;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void CMv_MainDlg::OnBnClickedRadioMachineSevenocean()
|
||||
{
|
||||
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioDataCaptureMode();
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioEngineering();
|
||||
}
|
||||
else
|
||||
{ // Demo Mode
|
||||
OnBnClickedRadioDemoMode();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void CMv_MainDlg::OnBnClickedRadioMachineGeneric()
|
||||
{
|
||||
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioDataCaptureMode();
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioEngineering();
|
||||
}
|
||||
else
|
||||
{ // Demo Mode
|
||||
OnBnClickedRadioDemoMode();
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CMv_MainDlg::OnBnClickedRadioAnimatics()
|
||||
{
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_DATA_CAPTURE_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioDataCaptureMode();
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_ENGINEERING_MODE))->GetCheck())
|
||||
{
|
||||
OnBnClickedRadioEngineering();
|
||||
}
|
||||
else
|
||||
{ // Demo Mode
|
||||
OnBnClickedRadioDemoMode();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "..\..\..\MicroVu\Mv_Proto.h"
|
||||
|
||||
// Mv_MainDlg dialog
|
||||
|
||||
class CMv_MainDlg : public CDialogEx
|
||||
{
|
||||
DECLARE_DYNAMIC(CMv_MainDlg)
|
||||
@@ -25,18 +24,6 @@ public:
|
||||
afx_msg void OnBnClickedButtonAutoTest();
|
||||
afx_msg void OnBnClickedButtonProtocolAnalyzerDlg();
|
||||
afx_msg void OnBnClickedButtonReplayStartup();
|
||||
CString m_csLogFile;
|
||||
CString m_csReplayFile;
|
||||
afx_msg void OnBnClickedOk();
|
||||
afx_msg void OnBnClickedButtonStartCapture();
|
||||
afx_msg void OnBnClickedRadioDataCaptureMode();
|
||||
afx_msg void OnBnClickedRadioEngineering();
|
||||
afx_msg void OnBnClickedRadioDemoMode();
|
||||
afx_msg void OnBnClickedButtonFileUtilities();
|
||||
afx_msg void OnBnClickedRadioMachineMicrovu();
|
||||
afx_msg void OnBnClickedRadioMachineMitutoyo();
|
||||
afx_msg void OnBnClickedButtonCreateConfig();
|
||||
afx_msg void OnBnClickedRadioMachineSevenocean();
|
||||
afx_msg void OnBnClickedRadioMachineGeneric();
|
||||
afx_msg void OnBnClickedRadioAnimatics();
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#define MAX_IN_BUFF_SIZE 1024
|
||||
#define MAX_OUT_BUFF_SIZE 0x1000 // this is the buffer for the bmp file.
|
||||
#include "..\Proto_Util.h"
|
||||
#define MAX_IN_BUFF_SIZE 0x20000
|
||||
#define MAX_OUT_BUFF_SIZE 0x20000 // this is the buffer for the bmp file.
|
||||
#define MAX_OUT_BUFF_LIMIT MAX_OUT_BUFF_SIZE - 300
|
||||
|
||||
enum _machine_e
|
||||
{
|
||||
MACHINE_MICROVU,
|
||||
MACHINE_MITUTOYO,
|
||||
MACHINE_KEYENCE,
|
||||
MACHINE_KEYENCE_TM_065,
|
||||
MACHINE_SO7,
|
||||
MACHINE_GENERIC
|
||||
};
|
||||
|
||||
@@ -15,7 +18,6 @@ enum _out_type_e
|
||||
{
|
||||
OUT_DETAIL,
|
||||
OUT_CONDENSED,
|
||||
OUT_REPLAY,
|
||||
OUT_SEGMENT
|
||||
};
|
||||
|
||||
@@ -32,12 +34,12 @@ public:
|
||||
~CMv_Proto_Dump(void);
|
||||
|
||||
//======================= First Level ========================================
|
||||
void DoMicroVuReceiveCondensedLine(char *outBuff, char *sendCmd);
|
||||
void DoMicroVuSendCondensedLine(char *outBuff, char *sendCmd);
|
||||
|
||||
void DoMicroVuReceiveDetailLine(char *outBuff, char *sendCmd);
|
||||
void DoMicroVuSendDetailLine(char *outBuff, char *sendCmd);
|
||||
|
||||
void DoKeyenceReceiveDetailLine(char *outBuff, char *sendCmd);
|
||||
void DoKeyenceSendDetailLine(char *outBuff, char *sendCmd);
|
||||
|
||||
void DoSo7SendDetailLine(char *outBuff, char *sendCmd);
|
||||
void DoSo7ReceiveDetailLine(char *outBuff, char *sendCmd);
|
||||
|
||||
@@ -49,32 +51,28 @@ public:
|
||||
int MainSnoopyFunction(LPCTSTR fname, _out_type_e _out_type, _machine_e _machine_e);
|
||||
int MainDmsFunction(LPCTSTR fname, _out_type_e _out_type, _machine_e _machine);
|
||||
int MainSegmentFunction(LPCTSTR fname, _out_type_e _out_type, _machine_e _machine);
|
||||
|
||||
//======================= Common Functions ====================================
|
||||
void OutputMicroVuReplayLine(char *outBuff); // iCmd = 0 send, iCmd = 1 recv.
|
||||
void OutputReplayGenericLine(char *outBuff); // iCmd = 0 send, iCmd = 1 recv.
|
||||
void OutputSegmentGenericLine(char *outBuff);
|
||||
void OutputMitutoyoReplayLine(char *outBuff); // iCmd = 0 send, iCmd = 1 recv.
|
||||
void OutputMicroVuCondensedLine(char *outBuff);
|
||||
void OutputMitutoyoCondesnedLine(char *outBuff);
|
||||
void OutputMitutoyoCondensedLine(char *outBuff); // iCmd = 0 send, iCmd = 1 recv.
|
||||
void OutputMicroVuDetailLine(char *outBuff);
|
||||
void OutputMicroVuCondensedLine(char *outBuff); // iCmd = 0 send, iCmd = 1 recv.
|
||||
void OutputMitutoyoDetailLine(char *outBuff);
|
||||
void OutputGenericCondensedLine(char *outBuff);
|
||||
void OutputSo7DetailLine(char *outBuff);
|
||||
|
||||
void Dump_BYTES(char *cBuff, int iLen);
|
||||
void Dump_Array_BYTE(char *cBuff);
|
||||
void Dump_Array_UINT(char *cBuff, int iLen);
|
||||
void Dump_Array_UINT_TO_INCH(char *cBuff, int iLen);
|
||||
void Dump_Array_LONG(char *cBuff, int iLen);
|
||||
void Dump_Array_Ascii(char *cBuff, char iEP, char *cResult);
|
||||
void Dump_Binary(char *cBuff);
|
||||
//======================= Keyence ===========================================
|
||||
void OutputKeyenceDetail_EP_01(char *outBuff);
|
||||
void OutputKeyenceDetail_EP_82(char *outBuff);
|
||||
void OutputKeyenceDetailLine(char *outBuff);
|
||||
void OutputKeyenceCondensedAnnotation(char *outBuff, int iCmd0, int iCmd1);
|
||||
|
||||
void Build_Mitutoyo_Print_Line(char *print_line, char *cBuff);
|
||||
void Build_Mitutoyo_Data_Matrix(char *cBuff, char iEP);
|
||||
void Dump_Lighting(char *cBuff, char iEP);
|
||||
void Dump_Array_LONG_MM(char *cBuff, int iLen);
|
||||
void Print_Line(int iLen, unsigned char *cBuff);
|
||||
char matrix_print_line[MAX_IN_BUFF_SIZE];
|
||||
bool bPrint_Data_Matrix_Ready;
|
||||
const char *byte_to_binary ( int x );
|
||||
void Process_Data();
|
||||
FILE* pInFile;
|
||||
FILE* m_pOutFile;
|
||||
@@ -85,4 +83,5 @@ public:
|
||||
char cTSZ_Data[MAX_IN_BUFF_SIZE];
|
||||
static char cCurr_Cmd[MAX_IN_BUFF_SIZE];
|
||||
void _clear_blanks(char *cBuff);
|
||||
CProto_Util* m_ProtoUtil;
|
||||
};
|
||||
|
||||
@@ -13,9 +13,9 @@ extern CMv_Proto* m_pMv_Proto;
|
||||
|
||||
IMPLEMENT_DYNAMIC(CMv_ProtocolAnalyzerDlg, CDialogEx)
|
||||
|
||||
//=========================================================================
|
||||
CMv_ProtocolAnalyzerDlg::CMv_ProtocolAnalyzerDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialogEx(CMv_ProtocolAnalyzerDlg::IDD, pParent)
|
||||
//=========================================================================
|
||||
CMv_ProtocolAnalyzerDlg::CMv_ProtocolAnalyzerDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialogEx(CMv_ProtocolAnalyzerDlg::IDD, pParent)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -28,7 +28,7 @@ CMv_ProtocolAnalyzerDlg::~CMv_ProtocolAnalyzerDlg()
|
||||
//=========================================================================
|
||||
void CMv_ProtocolAnalyzerDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
CDialogEx::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMv_ProtocolAnalyzerDlg, CDialogEx)
|
||||
@@ -44,120 +44,106 @@ END_MESSAGE_MAP()
|
||||
//=========================================================================
|
||||
void CMv_ProtocolAnalyzerDlg::OnBnClickedOk()
|
||||
{
|
||||
_machine_e _machine;
|
||||
_machine_e _machine;
|
||||
CString cMsg;
|
||||
UpdateData();
|
||||
//
|
||||
// make sure the input file can be found
|
||||
//
|
||||
if (m_csLogFile.GetLength() == 0)
|
||||
{
|
||||
cMsg += _T("Input file must not be blank.");
|
||||
GetDlgItem(IDC_EDIT_MESSAGE)->SetWindowText(cMsg);
|
||||
return;
|
||||
};
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->GetCheck())
|
||||
_machine = MACHINE_MICROVU; // MicroVu
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->GetCheck())
|
||||
_machine = MACHINE_MITUTOYO; // Mitutoyo
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_TM_065))->GetCheck())
|
||||
_machine = MACHINE_KEYENCE_TM_065; // Keyence
|
||||
else
|
||||
_machine = MACHINE_GENERIC; // Generic
|
||||
|
||||
CString cMsg;
|
||||
UpdateData();
|
||||
_out_type_e _out_type;
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_OUT_DETAIL))->GetCheck())
|
||||
_out_type = OUT_DETAIL;
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_OUT_CONDENSED))->GetCheck())
|
||||
_out_type = OUT_CONDENSED;
|
||||
else
|
||||
_out_type = OUT_SEGMENT;
|
||||
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->GetCheck())
|
||||
_machine = MACHINE_MICROVU; // MicroVu
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->GetCheck())
|
||||
_machine = MACHINE_MITUTOYO; // Mitutoyo
|
||||
else
|
||||
_machine = MACHINE_GENERIC; // Generic
|
||||
CMv_Proto_Dump* mv_proto_dump = new CMv_Proto_Dump;
|
||||
cMsg = _T("Sytem Ready.");
|
||||
|
||||
_out_type_e _out_type;
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_FULL))->GetCheck())
|
||||
_out_type = OUT_DETAIL;
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_EXTRACT))->GetCheck())
|
||||
_out_type = OUT_CONDENSED;
|
||||
else
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_REPLAY_FILE))->GetCheck())
|
||||
_out_type = OUT_REPLAY; // Replay
|
||||
else
|
||||
_out_type=OUT_SEGMENT;
|
||||
_fmt_e _fmt;
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_FORMAT_SNOOPY))->GetCheck())
|
||||
_fmt = FMT_SNOOPY;
|
||||
else
|
||||
_fmt = FMT_DMS;
|
||||
|
||||
CMv_Proto_Dump* mv_proto_dump = new CMv_Proto_Dump;
|
||||
cMsg = _T("Sytem Ready.");
|
||||
|
||||
_fmt_e _fmt;
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_FORMAT_SNOOPY))->GetCheck())
|
||||
_fmt = FMT_SNOOPY;
|
||||
else
|
||||
_fmt = FMT_DMS;
|
||||
|
||||
if (_out_type == OUT_SEGMENT)
|
||||
{
|
||||
if (mv_proto_dump->MainSegmentFunction(m_csLogFile, _out_type, _machine))
|
||||
{
|
||||
cMsg += _T("\r\nSnoopy Input File not found.");
|
||||
} else {
|
||||
cMsg += _T("\r\nInput File :") + m_csLogFile;
|
||||
cMsg += _T("\r\nMachine Signature : ");
|
||||
cMsg += m_pMv_Proto->g_machine.s_machine_config._str_6f00_signature;
|
||||
cMsg += _T("\r\n7000 Lighting Signature : ");
|
||||
cMsg += m_pMv_Proto->g_machine.s_machine_config._str_7000_signature;
|
||||
cMsg += _T("\r\n ");
|
||||
cMsg += m_csLogFile;
|
||||
cMsg += _T("\r\nProcessing Completed.");
|
||||
};
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (_fmt)
|
||||
{
|
||||
case FMT_SNOOPY:
|
||||
if (mv_proto_dump->MainSnoopyFunction(m_csLogFile, _out_type, _machine))
|
||||
{
|
||||
cMsg += _T("\r\nSnoopy Input File not found.");
|
||||
} else {
|
||||
cMsg += _T("\r\nInput File :") + m_csLogFile;
|
||||
cMsg += _T("\r\nMachine Signature : ");
|
||||
cMsg += m_pMv_Proto->g_machine.s_machine_config._str_6f00_signature;
|
||||
cMsg += _T("\r\n7000 Lighting Signature : ");
|
||||
cMsg += m_pMv_Proto->g_machine.s_machine_config._str_7000_signature;
|
||||
cMsg += _T("\r\n ");
|
||||
cMsg += m_csLogFile;
|
||||
cMsg += _T("\r\nProcessing Completed.");
|
||||
};
|
||||
break;
|
||||
case FMT_DMS:
|
||||
if (mv_proto_dump->MainDmsFunction(m_csLogFile, _out_type, _machine))
|
||||
{
|
||||
cMsg += _T("\r\nDms Input File not found.");
|
||||
} else {
|
||||
cMsg += _T("\r\n");
|
||||
cMsg += m_csLogFile;
|
||||
cMsg += _T("\r\nProcessing Completed.");
|
||||
};
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
delete mv_proto_dump;
|
||||
GetDlgItem(IDC_EDIT_MESSAGE)->SetWindowText(cMsg);
|
||||
MessageBox( _T("Processing Completed."), _T("Message"), MB_OK);
|
||||
if (_out_type == OUT_SEGMENT)
|
||||
{
|
||||
if (mv_proto_dump->MainSegmentFunction(m_csLogFile, _out_type, _machine))
|
||||
{
|
||||
cMsg += _T("\r\nSnoopy Input File not found.");
|
||||
}
|
||||
else
|
||||
{
|
||||
cMsg += _T("\r\nInput File :") + m_csLogFile;
|
||||
cMsg += _T("\r\nProcessing Completed.");
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (_fmt)
|
||||
{
|
||||
case FMT_SNOOPY:
|
||||
if (mv_proto_dump->MainSnoopyFunction(m_csLogFile, _out_type, _machine))
|
||||
{
|
||||
cMsg += _T("\r\nSnoopy Input File not found - ");
|
||||
cMsg += m_csLogFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
cMsg += _T("\r\nInput File :") + m_csLogFile;
|
||||
cMsg += _T("\r\nProcessing Completed.");
|
||||
};
|
||||
break;
|
||||
case FMT_DMS:
|
||||
if (mv_proto_dump->MainDmsFunction(m_csLogFile, _out_type, _machine))
|
||||
{
|
||||
cMsg += _T("\r\nDms Input File not found - ");
|
||||
cMsg += m_csLogFile;
|
||||
} else {
|
||||
cMsg += _T("\r\nInput File :") + m_csLogFile;
|
||||
cMsg += _T("\r\nProcessing Completed.");
|
||||
};
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
delete mv_proto_dump;
|
||||
GetDlgItem(IDC_EDIT_MESSAGE)->SetWindowText(cMsg);
|
||||
MessageBox( _T("Processing Completed."), _T("Message"), MB_OK);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
BOOL CMv_ProtocolAnalyzerDlg::OnInitDialog()
|
||||
{
|
||||
m_csLogFile = _T("");
|
||||
((CButton *)GetDlgItem(IDC_RADIO_FORMAT_SNOOPY))->SetCheck(1);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_FORMAT_DMS))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_EXTRACT))->SetCheck(1);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_FULL))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_OUT_CONDENSED))->SetCheck(1);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_OUT_DETAIL))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->SetCheck(0);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_TM_065))->SetCheck(1);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_GENERIC))->SetCheck(0);
|
||||
switch (m_machine)
|
||||
{
|
||||
case 0:
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_GENERIC))->SetCheck(1);
|
||||
break;
|
||||
case 1:
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->SetCheck(1);
|
||||
break;
|
||||
case 2:
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MITUTOYO))->SetCheck(1);
|
||||
break;
|
||||
default:
|
||||
((CButton *)GetDlgItem(IDC_RADIO_MACHINE_GENERIC))->SetCheck(1);
|
||||
break;
|
||||
};
|
||||
GetDlgItem(IDC_EDIT_MESSAGE)->SetWindowText(_T("System Ready."));
|
||||
return TRUE;
|
||||
};
|
||||
|
||||
@@ -1618,6 +1618,7 @@ BEGIN
|
||||
PUSHBUTTON "_disable_joy",IDC_BUTTON_DISABLE_JOYSTICK,54,72,55,13
|
||||
PUSHBUTTON "_enable_joy",IDC_BUTTON_ENABLE_JOYSTICK,115,72,55,13
|
||||
EDITTEXT IDC_EDIT1,304,118,25,13,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Replay Startup",IDC_BUTTON_REPLAY_CAPTURE,103,29,63,13
|
||||
END
|
||||
|
||||
IDD_MV_UTIL_MOVE_LOCATION DIALOGEX 0, 0, 261, 335
|
||||
@@ -1712,62 +1713,52 @@ BEGIN
|
||||
EDITTEXT IDC_EDIT_BOTTOM_LIGHT,66,31,43,12,ES_AUTOHSCROLL
|
||||
END
|
||||
|
||||
IDD_DIALOG_MAIN_MENU DIALOGEX 0, 0, 304, 426
|
||||
IDD_DIALOG_MAIN_MENU DIALOGEX 0, 0, 290, 228
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "PCDMIS Interface Utility"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "Select Mode",IDC_STATIC,16,7,262,32
|
||||
CONTROL "Demo",IDC_RADIO_DEMO_MODE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,30,22,33,8
|
||||
CONTROL "Engineering",IDC_RADIO_ENGINEERING_MODE,"Button",BS_AUTORADIOBUTTON,83,22,53,8
|
||||
CONTROL "Data Capture",IDC_RADIO_DATA_CAPTURE_MODE,"Button",BS_AUTORADIOBUTTON,156,22,57,8
|
||||
GROUPBOX "Target Machine",IDC_STATIC,16,40,263,32
|
||||
CONTROL "MicroVu",IDC_RADIO_MACHINE_MICROVU,"Button",BS_AUTORADIOBUTTON | WS_GROUP,30,55,38,8
|
||||
CONTROL "Mitutoyo",IDC_RADIO_MACHINE_MITUTOYO,"Button",BS_AUTORADIOBUTTON,72,55,40,8
|
||||
CONTROL "SevenOcean",IDC_RADIO_MACHINE_SevenOcean,"Button",BS_AUTORADIOBUTTON,116,55,54,8
|
||||
CONTROL "Animatics",IDC_RADIO_MACHINE_ANIMATICS,"Button",BS_AUTORADIOBUTTON,174,55,46,10
|
||||
CONTROL "Generic",IDC_RADIO_MACHINE_GENERIC,"Button",BS_AUTORADIOBUTTON,224,55,39,8
|
||||
PUSHBUTTON "Auto Test",IDC_BUTTON_AUTO_TEST,23,78,79,30
|
||||
PUSHBUTTON "Diagnostics",IDC_BUTTON_DIAGNOSTICS,23,112,79,30
|
||||
PUSHBUTTON "Replay Startup",IDC_BUTTON_REPLAY_STARTUP,23,146,79,30
|
||||
PUSHBUTTON "Protocol Analyzer",IDC_BUTTON_PROTOCOL_ANALYZER,23,180,79,30
|
||||
PUSHBUTTON "Collects Usb Data",IDC_BUTTON_START_CAPTURE,23,214,79,30
|
||||
PUSHBUTTON "Create Config",IDC_BUTTON_CREATE_CONFIG,23,248,79,30
|
||||
PUSHBUTTON "File Utilities",IDC_BUTTON_FILE_UTILITIES,23,282,79,30
|
||||
LTEXT "This is a one-click exercise of the target machine.\n\rPlease clear the stage prior to start.\n\rYou will be prompted to confirm this operation later.",IDC_STATIC_AUTO_TEST,114,80,167,28
|
||||
LTEXT "Reserved for WAI programmers.",IDC_STATIC_DIAGNOSTICS,114,118,118,9
|
||||
LTEXT "Advanced Option to replay a captured file.",IDC_STATIC_REPLAY,114,153,145,9
|
||||
LTEXT "Analyze Captured Data.",IDC_STATIC_PROTOCOL_ANALYZER,114,188,96,12
|
||||
LTEXT "Intercepts the target machine Usb commands using a custom device driver. You will be prompted for the file destination when done.",IDC_STATIC_COLLECTS_TEXT,114,215,168,27
|
||||
LTEXT "Creates/updates mv_config.cfg file. In most cases, you should run the Collects Usb Data prior to building the mv_config.cfg file.",IDC_STATIC_MV_CONFIG,114,250,173,25
|
||||
DEFPUSHBUTTON "Exit",IDOK,247,397,50,22
|
||||
GROUPBOX "Target Machine",IDC_STATIC,12,63,268,51
|
||||
CONTROL "MicroVu",IDC_RADIO_MACHINE_MICROVU,"Button",BS_AUTORADIOBUTTON | WS_GROUP,21,78,38,8
|
||||
CONTROL "Mitutoyo",IDC_RADIO_MACHINE_MITUTOYO,"Button",BS_AUTORADIOBUTTON,69,78,40,8
|
||||
CONTROL "TM-065",IDC_RADIO_MACHINE_TM_065,"Button",BS_AUTORADIOBUTTON,124,78,36,8
|
||||
CONTROL "SO7",IDC_RADIO_MACHINE_SevenOcean,"Button",BS_AUTORADIOBUTTON,22,96,30,8
|
||||
CONTROL "Animatics",IDC_RADIO_MACHINE_ANIMATICS,"Button",BS_AUTORADIOBUTTON,69,96,46,8
|
||||
CONTROL "Generic",IDC_RADIO_MACHINE_GENERIC,"Button",BS_AUTORADIOBUTTON,124,96,39,8
|
||||
PUSHBUTTON "Auto Test",IDC_BUTTON_AUTO_TEST,16,127,79,30
|
||||
PUSHBUTTON "Diagnostics",IDC_BUTTON_DIAGNOSTICS,16,162,79,30
|
||||
PUSHBUTTON "Protocol Analyzer",IDC_BUTTON_PROTOCOL_ANALYZER,21,23,67,30
|
||||
LTEXT "This is a one-click exercise of the target machine.\n\rPlease clear the stage prior to start.\n\rYou will be prompted to confirm this operation later.",IDC_STATIC_AUTO_TEST,101,129,167,31
|
||||
LTEXT "Reserved for WAI programmers.",IDC_STATIC_DIAGNOSTICS,102,168,118,9
|
||||
DEFPUSHBUTTON "Exit",IDOK,239,192,39,20
|
||||
PUSHBUTTON "File Utilities",IDC_BUTTON_FILE_UTILITIES,94,23,67,30
|
||||
GROUPBOX "System Utilities",IDC_STATIC,12,9,268,51
|
||||
END
|
||||
|
||||
IDD_DIALOG_PROTOCOL_ANALYZER DIALOGEX 0, 0, 311, 221
|
||||
IDD_DIALOG_PROTOCOL_ANALYZER DIALOGEX 0, 0, 348, 215
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Protocol Analyzer"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Browse",IDC_BUTTON_BROWSE,260,16,33,14
|
||||
EDITTEXT IDC_EDIT_INPUT_FILE,52,16,199,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "Output Format",IDC_STATIC_OPTION,11,64,201,28,WS_GROUP
|
||||
CONTROL "Detail",IDC_RADIO_OUT_DETAIL,"Button",BS_AUTORADIOBUTTON,19,78,42,8
|
||||
CONTROL "Condensed",IDC_RADIO_OUT_CONDENSED,"Button",BS_AUTORADIOBUTTON,63,78,50,8
|
||||
CONTROL "Segment",IDC_RADIO_SEGMENT_FILE,"Button",BS_AUTORADIOBUTTON,119,78,42,8
|
||||
DEFPUSHBUTTON "OK",IDOK,259,194,38,14
|
||||
PUSHBUTTON "Exit",IDCANCEL,300,194,38,14
|
||||
LTEXT "Input File : ",IDC_STATIC,12,17,38,10
|
||||
GROUPBOX "Machine",IDC_STATIC_FORMAT,15,38,177,28,WS_GROUP
|
||||
CONTROL "MicoVu",IDC_RADIO_MACHINE_MICROVU,"Button",BS_AUTORADIOBUTTON,20,51,37,8
|
||||
CONTROL "Mitutoyo",IDC_RADIO_MACHINE_MITUTOYO,"Button",BS_AUTORADIOBUTTON,61,51,41,8
|
||||
CONTROL "Keyence",IDC_RADIO_MACHINE_KEYENCE_TM3000,"Button",BS_AUTORADIOBUTTON,106,51,37,8
|
||||
CONTROL "Generic",IDC_RADIO_MACHINE_GENERIC,"Button",BS_AUTORADIOBUTTON,152,51,37,8
|
||||
GROUPBOX "Data Capture Format",IDC_STATIC,204,38,94,28,WS_GROUP
|
||||
CONTROL "Snoopy",IDC_RADIO_FORMAT_SNOOPY,"Button",BS_AUTORADIOBUTTON,210,51,36,8
|
||||
CONTROL "DMS",IDC_RADIO_FORMAT_DMS,"Button",BS_AUTORADIOBUTTON,262,51,25,8
|
||||
GROUPBOX "Output Format",IDC_STATIC_OPTION,16,72,204,28,WS_GROUP
|
||||
CONTROL "Detail",IDC_RADIO_FULL,"Button",BS_AUTORADIOBUTTON,26,84,42,8
|
||||
CONTROL "Condensed",IDC_RADIO_EXTRACT,"Button",BS_AUTORADIOBUTTON,66,84,50,8
|
||||
CONTROL "Replay",IDC_RADIO_REPLAY_FILE,"Button",BS_AUTORADIOBUTTON,124,84,34,8
|
||||
CONTROL "Segment",IDC_RADIO_SEGMENT_FILE,"Button",BS_AUTORADIOBUTTON,167,84,38,8
|
||||
CONTROL "De-Dupe",IDC_CHECK_DE_DUPE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,84,44,9
|
||||
EDITTEXT IDC_EDIT_MESSAGE,17,112,277,82,ES_MULTILINE | ES_AUTOHSCROLL | WS_VSCROLL | WS_HSCROLL
|
||||
DEFPUSHBUTTON "OK",IDOK,221,200,38,14
|
||||
PUSHBUTTON "Exit",IDCANCEL,266,200,38,14
|
||||
EDITTEXT IDC_EDIT_INPUT_FILE,52,16,214,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Browse",IDC_BUTTON_BROWSE,270,15,33,14
|
||||
GROUPBOX "Machine",IDC_STATIC_FORMAT,11,35,235,28,WS_GROUP
|
||||
CONTROL "MicoVu",IDC_RADIO_MACHINE_MICROVU,"Button",BS_AUTORADIOBUTTON,19,48,36,8
|
||||
CONTROL "Mitu",IDC_RADIO_MACHINE_MITUTOYO,"Button",BS_AUTORADIOBUTTON,120,48,28,8
|
||||
CONTROL "Generic",IDC_RADIO_MACHINE_GENERIC,"Button",BS_AUTORADIOBUTTON,164,48,37,8
|
||||
GROUPBOX "Captured Data Format",IDC_STATIC,248,35,89,28,WS_GROUP
|
||||
CONTROL "Snoopy",IDC_RADIO_FORMAT_SNOOPY,"Button",BS_AUTORADIOBUTTON,258,48,36,8
|
||||
CONTROL "DMS",IDC_RADIO_FORMAT_DMS,"Button",BS_AUTORADIOBUTTON,300,48,25,8
|
||||
EDITTEXT IDC_EDIT_MESSAGE,11,97,328,90,ES_MULTILINE | ES_AUTOHSCROLL | WS_VSCROLL | WS_HSCROLL
|
||||
CONTROL "De-Dupe",IDC_CHECK_DE_DUPE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,77,44,9
|
||||
CONTROL "TM-065R",IDC_RADIO_MACHINE_TM_065,"Button",BS_AUTORADIOBUTTON,63,48,40,8
|
||||
END
|
||||
|
||||
IDD_DIALOG_AUTO_TEST DIALOGEX 0, 0, 270, 273
|
||||
@@ -1780,7 +1771,7 @@ BEGIN
|
||||
LTEXT "Iterations (0 for infinite) : ",IDC_STATIC,140,188,84,13
|
||||
EDITTEXT IDC_EDIT_ITERATIONS,228,186,22,12,ES_RIGHT | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_AUTO_TEST_TEXT,9,10,252,113,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_HSCROLL
|
||||
DEFPUSHBUTTON "Break",IDSTOP,151,243,37,23
|
||||
DEFPUSHBUTTON "Break",IDSTOP_AUTO_TEST,151,243,37,23
|
||||
LTEXT "Motion Speed: ",IDC_STATIC,140,202,49,13
|
||||
EDITTEXT IDC_EDIT_MOTION_SPEED,228,201,22,12,ES_RIGHT | ES_AUTOHSCROLL
|
||||
CONTROL "Cycle Ring Lights",IDC_CHECK_CYCLE_RING_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,202,67,10
|
||||
@@ -1925,7 +1916,7 @@ BEGIN
|
||||
LTEXT "Iterations (0 for infinite) : ",IDC_STATIC,142,188,84,13
|
||||
EDITTEXT IDC_EDIT_ITERATIONS,230,186,22,12,ES_RIGHT | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_AUTO_TEST_TEXT,9,10,252,113,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_BORDER | WS_VSCROLL | WS_HSCROLL
|
||||
DEFPUSHBUTTON "Break",IDSTOP,152,230,37,23
|
||||
DEFPUSHBUTTON "Break",IDSTOP_AUTO_TEST_MITUTOYO,152,230,37,23
|
||||
LTEXT "Motion Speed: ",IDC_STATIC,142,202,49,13
|
||||
EDITTEXT IDC_EDIT_MOTION_SPEED,230,201,22,12,ES_RIGHT | ES_AUTOHSCROLL
|
||||
CONTROL "Cycle Ring Lights",IDC_CHECK_CYCLE_RING_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,202,67,10
|
||||
@@ -1944,23 +1935,87 @@ BEGIN
|
||||
EDITTEXT IDC_EDIT_SCALE_ZM,35,158,58,13,ES_RIGHT | ES_AUTOHSCROLL
|
||||
END
|
||||
|
||||
IDD_DIALOG_FILE_UTILITIES DIALOGEX 0, 0, 308, 148
|
||||
IDD_DIALOG_FILE_UTILITIES DIALOGEX 0, 0, 313, 161
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "File Utilities"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "Binary to HEX ASCII",IDC_RADIO_HEX_BIN2ASCII,"Button",BS_AUTORADIOBUTTON,26,41,87,10
|
||||
CONTROL "De-Dupe Text Lines",IDC_RADIO_DEDUPE,"Button",BS_AUTORADIOBUTTON,26,53,78,14
|
||||
CONTROL "Hex ASCII to Binary",IDC_RADIO_HEX_ASCII2BIN,"Button",BS_AUTORADIOBUTTON,26,69,91,14
|
||||
CONTROL "Dump binary",IDC_RADIO_DUMP_BINARY,"Button",BS_AUTORADIOBUTTON,26,85,64,14
|
||||
CONTROL "Extract",IDC_RADIO_EXTRACT,"Button",BS_AUTORADIOBUTTON,26,101,38,14
|
||||
EDITTEXT IDC_EDIT_CRITERIA,67,102,179,12,ES_AUTOHSCROLL
|
||||
CONTROL "Exclude",IDC_CHECK_NEGATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,103,43,11
|
||||
DEFPUSHBUTTON "OK",IDOK,198,127,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,251,127,50,14
|
||||
LTEXT "Input File : ",IDC_STATIC,27,19,38,10
|
||||
EDITTEXT IDC_EDIT_INPUT_FILE,67,18,179,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Browse",IDC_BUTTON_BROWSE,250,17,33,14
|
||||
CONTROL "De-Dupe Text Lines",IDC_RADIO_DEDUPE,"Button",BS_AUTORADIOBUTTON,27,40,78,10
|
||||
CONTROL "Hex to Binary",IDC_RADIO_2BIN,"Button",BS_AUTORADIOBUTTON,27,55,61,10
|
||||
CONTROL "Dump Binary",IDC_RADIO_DUMP_BINARY,"Button",BS_AUTORADIOBUTTON,27,70,60,10
|
||||
CONTROL "Extract",IDC_RADIO_OUT_EXTRACT,"Button",BS_AUTORADIOBUTTON,27,101,38,10
|
||||
EDITTEXT IDC_EDIT_CRITERIA,67,101,179,12,ES_AUTOHSCROLL
|
||||
CONTROL "Exclude",IDC_CHECK_NEGATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,250,102,43,11
|
||||
DEFPUSHBUTTON "OK",IDOK,203,140,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,256,140,50,14
|
||||
LTEXT "Input File : ",IDC_STATIC,19,19,38,10
|
||||
EDITTEXT IDC_EDIT_INPUT_FILE,59,18,187,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Browse",IDC_BUTTON_BROWSE,253,17,33,14
|
||||
CONTROL "Dump PRS",IDC_RADIO_DUMP_PRS,"Button",BS_AUTORADIOBUTTON,27,85,60,10
|
||||
END
|
||||
|
||||
IDD_SO7_UTIL_MOVE_LOCATION DIALOGEX 0, 0, 283, 436
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Move To Location(SO7)"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_EDIT_MOVE_TO_X,41,78,53,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_MOVE_TO_Y,41,94,53,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_MOVE_TO_Z,41,110,53,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_MOVE_TO_ZM,41,126,53,12,ES_AUTOHSCROLL
|
||||
CONTROL "Reverse",IDC_CHECK_REVERSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,119,79,43,10
|
||||
PUSHBUTTON "Move To XYZ",ID_OK_START,102,101,71,13,BS_MULTILINE
|
||||
PUSHBUTTON "Move To Zoom",IDC_BUTTON_MOVE_TO_ZOOM,102,124,71,13
|
||||
PUSHBUTTON "Move To XYZ(JM)",IDC_BUTTON_MOVE_TO_XYZ_JM,180,78,71,13
|
||||
PUSHBUTTON "Move To XYZ(Laser)",IDC_BUTTON_MOVE_TO_XYZ_LASER,180,101,71,13
|
||||
PUSHBUTTON "Move To XYZV",IDC_BUTTON_MOVE_TO_XYZV,180,124,71,13
|
||||
EDITTEXT IDC_EDIT_REPETEST_DIS,124,224,57,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_REPETEST_TIMES,124,248,57,12,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_REPETEST_INTERVAL,124,272,45,12,ES_RIGHT | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_REPETEST_ERRORRANGE,124,296,45,12,ES_RIGHT | ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Begin",IDC_BUTTON_BEGIN_REPE_TEST,194,234,56,13
|
||||
PUSHBUTTON "Save...",IDC_BUTTON_SAVE_REPETEST,194,269,56,13
|
||||
GROUPBOX "System",IDC_STATIC,19,9,64,46
|
||||
CONTROL "inch",IDC_RADIO_INCH,"Button",BS_AUTORADIOBUTTON | WS_GROUP,33,20,29,10
|
||||
CONTROL "mm",IDC_RADIO_MM,"Button",BS_AUTORADIOBUTTON,33,30,27,10
|
||||
CONTROL "pulse",IDC_RADIO_SCALE,"Button",BS_AUTORADIOBUTTON,33,40,33,10
|
||||
GROUPBOX "Move Type",IDC_STATIC,102,10,68,45
|
||||
CONTROL "Relative",IDC_RADIO_MOVE_RELATIVE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,116,22,42,10
|
||||
CONTROL "Absolute",IDC_RADIO_MOVE_ABSOLUTE,"Button",BS_AUTORADIOBUTTON,116,38,44,10
|
||||
GROUPBOX "Move Speed",IDC_STATIC,185,9,69,46
|
||||
CONTROL "Fast",IDC_RADIO_SPEED_FAST,"Button",BS_AUTORADIOBUTTON | WS_GROUP,195,20,30,10
|
||||
CONTROL "Slow",IDC_RADIO_SPEED_SLOW,"Button",BS_AUTORADIOBUTTON,195,30,31,10
|
||||
CONTROL "User Defined",IDC_RADIO_SPEED_USER_DEFINED,"Button",BS_AUTORADIOBUTTON,195,40,54,10
|
||||
PUSHBUTTON "EXIT",IDCANCEL,226,415,50,14
|
||||
LTEXT "x",IDC_STATIC,29,78,8,8
|
||||
LTEXT "y",IDC_STATIC,29,94,8,8
|
||||
LTEXT "z",IDC_STATIC,29,111,8,8
|
||||
LTEXT "zm",IDC_STATIC,25,127,8,8
|
||||
LTEXT "x",IDC_STATIC,29,172,8,11
|
||||
LTEXT "y",IDC_STATIC,29,190,8,11
|
||||
LTEXT "z",IDC_STATIC,109,172,8,11
|
||||
LTEXT "zm",IDC_STATIC,107,193,11,11
|
||||
EDITTEXT IDC_EDIT_X_AXIS,40,171,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT_Y_AXIS,40,190,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT_Z_AXIS,121,171,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT_ZM_AXIS,121,190,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
GROUPBOX "Move To Position",IDC_STATIC,20,63,236,90
|
||||
GROUPBOX "Position",IDC_STATIC,18,157,238,50
|
||||
PUSHBUTTON "Zero Set",IDC_BUTTON_ZERO_SET,191,179,56,13
|
||||
GROUPBOX "Repeatability Test",IDC_STATIC,19,209,238,106
|
||||
LTEXT "To",IDC_STATIC,102,225,8,8
|
||||
LTEXT "Times",IDC_STATIC,97,251,19,8
|
||||
EDITTEXT IDC_EDIT_REPRETEST,22,322,236,67,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
|
||||
CONTROL "x",IDC_CHECK_REPETESTX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,225,20,10
|
||||
CONTROL "y",IDC_CHECK_REPETESTY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,239,20,10
|
||||
CONTROL "z",IDC_CHECK_REPETESTZ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,253,20,10
|
||||
LTEXT "Pause",IDC_STATIC,95,274,20,8
|
||||
LTEXT "ms",IDC_STATIC,172,274,10,8
|
||||
CONTROL "Absolute",IDC_CHECK_REPETEST_ABSOLUTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,297,44,10
|
||||
LTEXT "Deadband",IDC_STATIC,86,298,34,8
|
||||
LTEXT "um",IDC_STATIC_DEADBAND_UNITS,172,298,19,8
|
||||
CONTROL "VolComp",IDC_CHECK_REPETEST_VOLCOMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,283,43,10
|
||||
CONTROL "V",IDC_CHECK_REPETESTV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,267,20,10
|
||||
END
|
||||
|
||||
IDD_DIALOG_TEST_KEYENCE DIALOGEX 0, 0, 741, 349
|
||||
@@ -2016,6 +2071,31 @@ BEGIN
|
||||
PUSHBUTTON "Calibrate",IDC_BUTTON_KEYENCE_LASER_CALIBRATE_VALUE0,139,40,50,14
|
||||
END
|
||||
|
||||
IDD_DIALOG_KEYENCE_DLG DIALOGEX 0, 0, 270, 172
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Keyence Utility"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,169,151,42,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,215,151,42,14
|
||||
PUSHBUTTON "Read Program",IDC_BUTTON_READ_PROGRAM,95,7,69,17
|
||||
PUSHBUTTON "Start Machine",IDC_BUTTON_START_MACHINE,11,7,69,17
|
||||
PUSHBUTTON "Read Environment",IDC_BUTTON_READ_ENVIRONMENT,11,47,69,17
|
||||
PUSHBUTTON "Write Program",IDC_BUTTON_WRITE_PROGRAM,95,26,69,17
|
||||
PUSHBUTTON "Write Environment",IDC_BUTTON_WRITE_ENVIRONMENT,11,67,69,17
|
||||
PUSHBUTTON "Read Image",IDC_BUTTON_READ_IMAGE,95,47,69,17
|
||||
PUSHBUTTON "Set Trigger",IDC_BUTTON_SET_TRIGGER,179,47,69,17
|
||||
PUSHBUTTON "Get Meas Value",IDC_BUTTON_GET_MEAS_VALUE,179,67,69,17
|
||||
PUSHBUTTON "Do Measure",IDC_BUTTON_DO_MEASURE,94,107,69,17
|
||||
EDITTEXT IDC_EDIT_MEASURE_VALUE,178,108,68,15,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "Initialize Programs",IDC_BUTTON_INIT_PROGRAM,179,7,69,17
|
||||
PUSHBUTTON "Settings",IDC_BUTTON_SETTINGS,179,26,69,17
|
||||
PUSHBUTTON "Read Settings",IDC_BUTTON_READ_SETTINGS,11,87,69,17
|
||||
PUSHBUTTON "Write Settings",IDC_BUTTON_WRITE_SETTINGS,11,107,69,17
|
||||
PUSHBUTTON "Stop Machine",IDC_BUTTON_STOP_MACHINE,11,127,69,17
|
||||
PUSHBUTTON "Replay Startup",IDC_BUTTON_REPLAY_STARTUP,11,26,69,17
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -2068,17 +2148,17 @@ BEGIN
|
||||
IDD_DIALOG_MAIN_MENU, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 297
|
||||
RIGHTMARGIN, 286
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 419
|
||||
BOTTOMMARGIN, 217
|
||||
END
|
||||
|
||||
IDD_DIALOG_PROTOCOL_ANALYZER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 304
|
||||
RIGHTMARGIN, 341
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 214
|
||||
BOTTOMMARGIN, 208
|
||||
END
|
||||
|
||||
IDD_DIALOG_AUTO_TEST, DIALOG
|
||||
@@ -2116,17 +2196,33 @@ BEGIN
|
||||
IDD_DIALOG_FILE_UTILITIES, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 301
|
||||
RIGHTMARGIN, 306
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 141
|
||||
BOTTOMMARGIN, 154
|
||||
END
|
||||
|
||||
IDD_SO7_UTIL_MOVE_LOCATION, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 276
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 429
|
||||
END
|
||||
|
||||
IDD_DIALOG_TEST_KEYENCE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 734
|
||||
RIGHTMARGIN, 402
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 342
|
||||
BOTTOMMARGIN, 207
|
||||
END
|
||||
|
||||
IDD_DIALOG_KEYENCE_DLG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 257
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 165
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
@@ -34,7 +34,6 @@ char *str_index_z = "\r\nIndex Positions Z: ";
|
||||
char *str_model = "\r\nModel : ";
|
||||
char *str_serial_no = "\r\nSerial No : ";
|
||||
|
||||
|
||||
// CMv_UtilDlg dialog
|
||||
|
||||
CMv_UtilDlg::CMv_UtilDlg(CWnd* pParent /*=NULL*/)
|
||||
@@ -82,6 +81,7 @@ BEGIN_MESSAGE_MAP(CMv_UtilDlg, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON_DISABLE_JOYSTICK, &CMv_UtilDlg::OnBnClickedButtonDisableJoystick)
|
||||
ON_BN_CLICKED(IDC_BUTTON_ENABLE_JOYSTICK, &CMv_UtilDlg::OnBnClickedButtonEnableJoystick)
|
||||
ON_BN_CLICKED(IDC_BUTTON_POLL_EP_02, &CMv_UtilDlg::OnBnClickedButtonPollEp02)
|
||||
ON_BN_CLICKED(IDC_BUTTON_REPLAY_CAPTURE, &CMv_UtilDlg::OnBnClickedButtonReplayCapture)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
// CMv_UtilDlg message handlers
|
||||
@@ -798,3 +798,41 @@ void CMv_UtilDlg::OnBnClickedButtonPollEp02()
|
||||
GetDlgItem(IDC_EDIT_STATUS)->SetWindowText(m_OutMessage);
|
||||
UpdateData(TRUE);
|
||||
}
|
||||
|
||||
//==================================================================
|
||||
void CMv_UtilDlg::OnBnClickedButtonReplayCapture()
|
||||
{
|
||||
CString m_csReplayFile;
|
||||
CString strFilters;
|
||||
CString strExt;
|
||||
strFilters = _T("Replay Data (*.annotated.proto.txt)|*.annotated.proto.txt|All Files (*.*)|*.*||");
|
||||
strExt = _T(".txt");
|
||||
CString strMsg;
|
||||
CFileDialog fileDlg(TRUE, strExt, _T("Replay.Txt"), OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, strFilters, this);
|
||||
if ( fileDlg.DoModal ()==IDOK )
|
||||
{
|
||||
m_csReplayFile = fileDlg.GetPathName();
|
||||
// Process MicroVu Machine
|
||||
if (((CButton *)GetDlgItem(IDC_RADIO_MACHINE_MICROVU))->GetCheck())
|
||||
{
|
||||
if (!m_pMv_Proto)
|
||||
m_pMv_Proto = new CMv_Proto();
|
||||
m_pMv_Proto->Init_MvUsb();
|
||||
m_pMv_Proto->_start_machine();
|
||||
m_pMv_Proto->_get_xyz_index();
|
||||
m_pMv_Proto->_poll_machine_59();
|
||||
m_pMv_Proto->mv_motion_Dcc_Home();
|
||||
if (m_pMv_Proto->_replay_capture(m_csReplayFile))
|
||||
{
|
||||
MessageBox( _T("Replay MicroVu Capture File not found."), _T("Message"), MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox( _T("Replay MicroVu Capture File Done."), _T("Message"), MB_OK);
|
||||
};
|
||||
m_pMv_Proto->_shutdown_machine();
|
||||
m_pMv_Proto->Exit_MvUsb();
|
||||
delete m_pMv_Proto;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "..\..\..\MicroVu\Mv_Proto.h"
|
||||
#include "..\..\..\KeyenceTM065\KeyenceTM065_Proto.h"
|
||||
|
||||
|
||||
extern CMv_Proto* m_pMv_Proto;
|
||||
extern CMv_Proto* m_pMv_Proto;
|
||||
extern CKeyenceTM065_Proto* m_pKeyenceTM065_Proto;
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -66,4 +67,5 @@ public:
|
||||
afx_msg void OnBnClickedButtonEnableJoystick();
|
||||
afx_msg void OnBnClickedButtonPollEp02();
|
||||
afx_msg void OnEnChangeEditXPosition59();
|
||||
afx_msg void OnBnClickedButtonReplayCapture();
|
||||
};
|
||||
|
||||
@@ -300,6 +300,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\Animatics\Animatics_Proto.cpp" />
|
||||
<ClCompile Include="..\..\..\KeyenceTM065\KeyenceTM065_Proto.cpp" />
|
||||
<ClCompile Include="..\..\..\Keyence\Keyence_Laser.cpp" />
|
||||
<ClCompile Include="..\..\..\Keyence\Keyence_Laser_LK_H.cpp" />
|
||||
<ClCompile Include="..\..\..\Keyence\Keyence_Proto.cpp" />
|
||||
@@ -325,6 +326,7 @@
|
||||
<ClCompile Include="DirDialog.cpp" />
|
||||
<ClCompile Include="DrawGraph.cpp" />
|
||||
<ClCompile Include="FileUtilitiesDlg.cpp" />
|
||||
<ClCompile Include="KeyenceTM065_Dlg.cpp" />
|
||||
<ClCompile Include="Keyence_UtilDlg.cpp" />
|
||||
<ClCompile Include="Mv_AutoTestDlg.cpp" />
|
||||
<ClCompile Include="Mv_File_Utilities.Cpp" />
|
||||
@@ -366,6 +368,7 @@
|
||||
<ClInclude Include="..\..\..\Animatics\Animatics_Proto.h" />
|
||||
<ClInclude Include="..\..\..\Animatics\IntegMotorInterface.h" />
|
||||
<ClInclude Include="..\..\..\Animatics\SMIDefs.h" />
|
||||
<ClInclude Include="..\..\..\KeyenceTM065\KeyenceTM065_Proto.h" />
|
||||
<ClInclude Include="..\..\..\Keyence\Keyence_Laser.h" />
|
||||
<ClInclude Include="..\..\..\Keyence\Keyence_Laser_LK_H.h" />
|
||||
<ClInclude Include="..\..\..\Keyence\Keyence_Proto.h" />
|
||||
@@ -394,6 +397,7 @@
|
||||
<ClInclude Include="DirDialog.h" />
|
||||
<ClInclude Include="DrawGraph.h" />
|
||||
<ClInclude Include="FileUtilitiesDlg.h" />
|
||||
<ClInclude Include="KeyenceTM065_Dlg.h" />
|
||||
<ClInclude Include="Keyence_UtilDlg.h" />
|
||||
<ClInclude Include="Mv_AutoTestDlg.h" />
|
||||
<ClInclude Include="Mv_File_Utilities.h" />
|
||||
|
||||
@@ -160,6 +160,12 @@
|
||||
<ClCompile Include="MyListCtrl.cpp">
|
||||
<Filter>Sources Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="KeyenceTM065_Dlg.cpp">
|
||||
<Filter>Sources Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\KeyenceTM065\KeyenceTM065_Proto.cpp">
|
||||
<Filter>Sources Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="CaptureDataDlg.h">
|
||||
@@ -354,6 +360,12 @@
|
||||
<ClInclude Include="MyListCtrl.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="KeyenceTM065_Dlg.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\KeyenceTM065\KeyenceTM065_Proto.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Mv_Util.rc
|
||||
//
|
||||
#define IDSTOP 3
|
||||
#define IDC_BUTTON_MOVE_W 3
|
||||
#define IDCANCEL3 3
|
||||
#define IDCANCEL2 4
|
||||
#define ID_OK_START 6
|
||||
#define IDSTOP 2
|
||||
#define IDSTOP_AUTO_TEST 3
|
||||
#define IDC_BUTTON_MOVE_W 4
|
||||
#define ID_OK_START 5
|
||||
#define IDSTOP_AUTO_TEST_MITUTOYO 8
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_MV_UTIL_DIALOG 102
|
||||
#define IDS_SO7_ABOUTBOX 102
|
||||
#define IDD_DIALOG_FRAME_ID 104
|
||||
#define IDD_MV_UTIL_MOVE_LOCATION 105
|
||||
#define IDS_ABOUTBOX 7
|
||||
#define IDD_MV_UTIL_DIALOG 101
|
||||
#define IDD_DIALOG_FRAME_ID 102
|
||||
#define IDD_MV_UTIL_MOVE_LOCATION 103
|
||||
#define IDS_SO7_ABOUTBOX 104
|
||||
#define IDD_DIALOG_SET_LIGHTS 106
|
||||
#define IDD_DIALOG_MAIN_MENU 107
|
||||
#define IDD_DIALOG_PROTOCOL_ANALYZER 108
|
||||
@@ -22,159 +22,160 @@
|
||||
#define IDD_MITU_UTIL_DIALOG 111
|
||||
#define IDD_DIALOG_AUTO_TEST_MITUTOYO 113
|
||||
#define IDD_DIALOG_FILE_UTILITIES 114
|
||||
#define IDD_SO7_UTIL_DIALOG 147
|
||||
#define IDD_SO7_UTIL_MOVE_LOCATION 148
|
||||
#define IDD_DIALOG_TEST_KEYENCE 149
|
||||
#define IDD_S07_UTIL_SEND_PARAMETER 151
|
||||
#define IDI_ICON1 152
|
||||
#define IDR_MAINFRAME 152
|
||||
#define IDD_SO7_UTIL_AUTO_ZOOM 153
|
||||
#define IDD_ANIMATICS_UTIL_DIALOG 154
|
||||
#define IDI_ICON_GREEN 155
|
||||
#define IDI_ICON_GRAY 157
|
||||
#define IDI_ICON_WHITE 158
|
||||
#define IDI_ICON_RED 159
|
||||
#define IDI_ICON_BLACK 160
|
||||
#define IDD_S07_OPTION_DIALOG 161
|
||||
#define IDD_DIALOG_VIDEOCARD_SDK3000 162
|
||||
#define IDD_SO7_VIDEOCARD_SDK3000 162
|
||||
#define IDD_DIALOG1 163
|
||||
#define IDD_SO7_VIDEOCARD_SV2000E 163
|
||||
#define IDD_SO7_UTIL_SETUP_CONFIGURE 164
|
||||
#define IDD_SO7_UTIL_IMAGE_DLL 165
|
||||
#define IDD_SO7_VIDEOCARD_TC4000 166
|
||||
#define IDD_SO7_UTIL_MANUAL_MACHINE 167
|
||||
#define IDD_SO7_UTIL_VERIFICATION_ALGORITHM 168
|
||||
#define IDD_SO7_VIDEOCARD_SV4000E 169
|
||||
#define IDD_SO7_UTIL_PROGRAM 170
|
||||
#define IDB_BITMAP_MINUS_SPEED 176
|
||||
#define IDB_BITMAP_PLUS_SPEED 177
|
||||
#define IDB_BITMAP_Y_BACKWARD 180
|
||||
#define IDB_BITMAP_Y_FRONTWARD 181
|
||||
#define IDB_BITMAP_Z_DOWN 182
|
||||
#define IDB_BITMAP_Z_UP 183
|
||||
#define IDB_BITMAP_X_LEFT 184
|
||||
#define IDB_BITMAP_X_RIGHT 187
|
||||
#define IDC_BUTTON_INIT_MVUSB 1001
|
||||
#define IDC_BUTTON_START_MACHINE 1002
|
||||
#define IDC_BUTTON_START_POLL_58 1004
|
||||
#define IDC_BUTTON_START_MACHINE2 1005
|
||||
#define IDC_BUTTON_START_SOMACHINE 1005
|
||||
#define IDD_SO7_UTIL_DIALOG 115
|
||||
#define IDD_SO7_UTIL_MOVE_LOCATION 116
|
||||
#define IDD_DIALOG_TEST_KEYENCE 117
|
||||
#define IDD_S07_UTIL_SEND_PARAMETER 118
|
||||
#define IDI_ICON1 119
|
||||
#define IDR_MAINFRAME 120
|
||||
#define IDD_SO7_UTIL_AUTO_ZOOM 121
|
||||
#define IDD_ANIMATICS_UTIL_DIALOG 122
|
||||
#define IDI_ICON_GREEN 123
|
||||
#define IDI_ICON_GRAY 124
|
||||
#define IDI_ICON_WHITE 125
|
||||
#define IDI_ICON_RED 126
|
||||
#define IDI_ICON_BLACK 127
|
||||
#define IDD_S07_OPTION_DIALOG 128
|
||||
#define IDD_DIALOG_VIDEOCARD_SDK3000 129
|
||||
#define IDD_SO7_VIDEOCARD_SDK3000 130
|
||||
#define IDD_DIALOG1 131
|
||||
#define IDD_SO7_VIDEOCARD_SV2000E 132
|
||||
#define IDD_SO7_UTIL_SETUP_CONFIGURE 133
|
||||
#define IDD_DIALOG_KEYENCE_DLG 134
|
||||
#define IDD_SO7_UTIL_VERIFICATION_ALGORITHM 135
|
||||
#define IDD_SO7_VIDEOCARD_SV4000E 136
|
||||
#define IDD_SO7_UTIL_PROGRAM 137
|
||||
#define IDB_BITMAP_MINUS_SPEED 138
|
||||
#define IDB_BITMAP_PLUS_SPEED 139
|
||||
#define IDB_BITMAP_Y_BACKWARD 140
|
||||
#define IDB_BITMAP_Y_FRONTWARD 141
|
||||
#define IDB_BITMAP_Z_DOWN 142
|
||||
#define IDB_BITMAP_Z_UP 143
|
||||
#define IDB_BITMAP_X_LEFT 144
|
||||
#define IDB_BITMAP_X_RIGHT 145
|
||||
#define IDC_BUTTON_INIT_MVUSB 146
|
||||
#define IDC_BUTTON_START_MACHINE 1000
|
||||
#define IDC_BUTTON_START_MACHINE3 1001
|
||||
#define IDC_BUTTON_START_POLL_58 1002
|
||||
#define IDC_BUTTON_START_MACHINE2 1003
|
||||
#define IDC_BUTTON_START_SOMACHINE 1004
|
||||
#define IDC_BUTTON_START_SO7MACHINE 1005
|
||||
#define IDC_BUTTON_START_POLL_2B 1006
|
||||
#define IDC_BUTTON_TERM_MVUSB 1007
|
||||
#define IDC_BUTTON_STOP_MACHINE 1009
|
||||
#define IDC_BUTTON_POLL_EP_02 1010
|
||||
#define IDC_EDIT_STATUS 1011
|
||||
#define IDC_BUTTON_START_POLL 1012
|
||||
#define IDC_BUTTON_START_POLL_59 1013
|
||||
#define IDC_BUTTON_SEEK_HOME 1014
|
||||
#define IDC_BUTTON_STOP_MACHINE 1008
|
||||
#define IDC_BUTTON_POLL_EP_02 1009
|
||||
#define IDC_BUTTON_STOP_MACHINE2 1010
|
||||
#define IDC_BUTTON_READ_PRS 1011
|
||||
#define IDC_EDIT_STATUS 1012
|
||||
#define IDC_BUTTON_START_POLL 1013
|
||||
#define IDC_BUTTON_START_POLL_59 1014
|
||||
#define IDC_BUTTON_SEEK_HOME 1015
|
||||
#define IDC_BUTTON_GET_CONFIG 1016
|
||||
#define IDC_CHECK_ANNOTATED 1017
|
||||
#define IDC_RADIO_FORMAT_SNOOPY 1018
|
||||
#define IDC_RADIO_FORMAT_DMS 1019
|
||||
#define IDC_BUTTON_DISABLE_JOYSTICK 1020
|
||||
#define IDC_EDIT_X_POSITION_59 1021
|
||||
#define IDC_RADIO_EXTRACT 1022
|
||||
#define IDC_RADIO_OUT_CONDENSED 1022
|
||||
#define IDC_EDIT_Y_POSITION_59 1023
|
||||
#define IDC_RADIO_FULL 1023
|
||||
#define IDC_RADIO_OUT_DETAIL 1023
|
||||
#define IDC_RADIO_REPLAY_FILE 1024
|
||||
#define IDC_EDIT_Z_POSITION_59 1025
|
||||
#define IDC_RADIO_SEGMENT_FILE 1025
|
||||
#define IDC_RADIO_SEGMENT_FILE 1026
|
||||
#define IDC_RADIO_FORMAT_MITU 1027
|
||||
#define IDC_EDIT_ZM_POSITION_59 1028
|
||||
#define IDC_EDIT_AXIAL_LIGHT 1029
|
||||
#define IDC_EDIT_BOTTOM_LIGHT 1030
|
||||
#define IDC_EDIT_HWS_1 1031
|
||||
#define IDC_BUTTON_LOAD_CONFIG 1032
|
||||
#define IDC_EDIT_HWS_0 1032
|
||||
#define IDC_BUTTON_CYCLE_RING 1033
|
||||
#define IDC_EDIT_X_POSITION_58 1034
|
||||
#define IDC_EDIT_Y_POSITION_58 1035
|
||||
#define IDC_EDIT_Z_POSITION_58 1036
|
||||
#define IDC_EDIT_ZM_POSITION_58 1037
|
||||
#define IDC_EDIT_X_POS_MM_CHANGE 1037
|
||||
#define IDC_BUTTON_SET_LIGHT 1038
|
||||
#define IDC_EDIT_Y_POS_MM_CHANGE 1038
|
||||
#define IDC_EDIT_Y_POSITION 1039
|
||||
#define IDC_EDIT_JS_MOVED 1039
|
||||
#define IDC_BUTTON_REPLAY_CAPTURE 1039
|
||||
#define IDC_EDIT_Z_POS_MM_CHANGE 1039
|
||||
#define IDC_BUTTON_GET_INDEX 1040
|
||||
#define IDC_EDIT_STAGE_STATUS_X 1040
|
||||
#define IDC_EDIT_Z_POSITION 1041
|
||||
#define IDC_EDIT_STAGE_STATUS_Y 1041
|
||||
#define IDC_BUTTON_REPLAY_STARTUP 1042
|
||||
#define IDC_EDIT_STAGE_STATUS_Z 1042
|
||||
#define IDC_EDIT_X_POSITION_EP02 1043
|
||||
#define IDC_EDIT_ZM_POSITION 1044
|
||||
#define IDC_EDIT_SC_X 1044
|
||||
#define IDC_EDIT_Y_POSITION_EP02 1045
|
||||
#define IDC_EDIT_SC_Y 1045
|
||||
#define IDC_CHECK_CONDENSED 1046
|
||||
#define IDC_EDIT_SC_Z 1046
|
||||
#define IDC_EDIT_Z_POSITION_EP02 1047
|
||||
#define IDC_EDIT_TS_0 1047
|
||||
#define IDC_BUTTON_MOVE_TO 1048
|
||||
#define IDC_EDIT_TS_1 1048
|
||||
#define IDC_EDIT_ZM_POSITION_EP02 1049
|
||||
#define IDC_EDIT_TS_2 1049
|
||||
#define IDC_EDIT_MOVE_TO_X 1050
|
||||
#define IDC_BUTTON_GET_INDEX2 1051
|
||||
#define IDC_EDIT_ACCEL_X 1051
|
||||
#define IDC_BUTTON_ENABLE_JOYSTICK 1052
|
||||
#define IDC_EDIT_MOVE_TO_Y 1053
|
||||
#define IDC_EDIT_MOVE_TO_Z 1054
|
||||
#define IDC_EDIT_X_INDEX 1055
|
||||
#define IDC_EDIT_ACCEL_Y 1055
|
||||
#define IDC_RADIO_MOVE_RELATIVE 1056
|
||||
#define IDC_EDIT_X_INDEX2 1056
|
||||
#define IDC_EDIT_RPX_POSITION 1056
|
||||
#define IDC_EDIT_Y_INDEX 1057
|
||||
#define IDC_EDIT_ACCEL_Z 1057
|
||||
#define IDC_EDIT_MOVE_TO_ZM 1058
|
||||
#define IDC_EDIT_RPY_POSITION 1058
|
||||
#define IDC_EDIT_Z_INDEX 1059
|
||||
#define IDC_EDIT_HWS_SPEED_X 1059
|
||||
#define IDC_RADIO_MOVE_ABSOLUTE 1060
|
||||
#define IDC_EDIT_Z_INDEX2 1060
|
||||
#define IDC_EDIT_RPZ_POSITION 1060
|
||||
#define IDC_EDIT_TSX 1061
|
||||
#define IDC_EDIT_ZM_INDEX 1062
|
||||
#define IDC_EDIT_TSY 1062
|
||||
#define IDC_RADIO_INCH 1063
|
||||
#define IDC_EDIT_ZM_INDEX2 1063
|
||||
#define IDC_EDIT_TS_XYZ 1063
|
||||
#define IDC_RADIO_MM 1064
|
||||
#define IDC_EDIT_TSZ 1064
|
||||
#define IDC_RADIO_FAST 1065
|
||||
#define IDC_RADIO_SPEED_FAST 1066
|
||||
#define IDC_EDIT_DECEL_X 1066
|
||||
#define IDC_EDIT_DECEL_Y 1067
|
||||
#define IDC_EDIT_DECEL_Z 1068
|
||||
#define IDC_RADIO_SPEED_SLOW 1070
|
||||
#define IDC_RADIO_SCALE 1072
|
||||
#define IDC_EDIT_SPEED_X 1073
|
||||
#define IDC_EDIT_SPEED_Y 1074
|
||||
#define IDC_EDIT_SPEED_Z 1075
|
||||
#define IDC_EDIT_ACC_X 1076
|
||||
#define IDC_EDIT_ACC_Y 1077
|
||||
#define IDC_EDIT_ACC_Z 1078
|
||||
#define IDC_EDIT_DEC_X 1079
|
||||
#define IDC_EDIT_DEC_Y 1080
|
||||
#define IDC_EDIT_DEC_Z 1081
|
||||
#define IDC_EDIT_MANUAL_SPEED_X 1082
|
||||
#define IDC_EDIT_MANUAL_SPEED_Y 1083
|
||||
#define IDC_EDIT_MANUAL_SPEED_Z 1084
|
||||
#define IDC_EDIT_MANUAL_ACC_X 1085
|
||||
#define IDC_EDIT_MANUAL_ACC_Y 1086
|
||||
#define IDC_EDIT_MANUAL_ACC_Z 1087
|
||||
#define IDC_EDIT_MANUAL_DEC_X 1088
|
||||
#define IDC_EDIT_MANUAL_DEC_Y 1089
|
||||
#define IDC_EDIT_MANUAL_DEC_Z 1090
|
||||
#define IDC_RADIO_SPEED_USER_DEFINED 1091
|
||||
#define IDC_CHECK_USE_MANUAL_MOTION_PARAMETERS 1092
|
||||
#define IDC_EDIT_MOVE_W 1093
|
||||
#define IDC_EDIT_HWS_0 1033
|
||||
#define IDC_BUTTON_CYCLE_RING 1034
|
||||
#define IDC_EDIT_X_POSITION_58 1035
|
||||
#define IDC_EDIT_Y_POSITION_58 1036
|
||||
#define IDC_EDIT_Z_POSITION_58 1037
|
||||
#define IDC_EDIT_ZM_POSITION_58 1038
|
||||
#define IDC_EDIT_X_POS_MM_CHANGE 1039
|
||||
#define IDC_BUTTON_SET_LIGHT 1040
|
||||
#define IDC_EDIT_Y_POS_MM_CHANGE 1041
|
||||
#define IDC_EDIT_Y_POSITION 1042
|
||||
#define IDC_EDIT_JS_MOVED 1043
|
||||
#define IDC_BUTTON_REPLAY_CAPTURE 1044
|
||||
#define IDC_EDIT_Z_POS_MM_CHANGE 1045
|
||||
#define IDC_BUTTON_GET_INDEX 1046
|
||||
#define IDC_EDIT_STAGE_STATUS_X 1047
|
||||
#define IDC_EDIT_Z_POSITION 1048
|
||||
#define IDC_EDIT_STAGE_STATUS_Y 1049
|
||||
#define IDC_BUTTON_REPLAY_STARTUP 1050
|
||||
#define IDC_EDIT_STAGE_STATUS_Z 1051
|
||||
#define IDC_EDIT_X_POSITION_EP02 1052
|
||||
#define IDC_EDIT_ZM_POSITION 1053
|
||||
#define IDC_EDIT_SC_X 1054
|
||||
#define IDC_EDIT_Y_POSITION_EP02 1055
|
||||
#define IDC_EDIT_SC_Y 1056
|
||||
#define IDC_CHECK_CONDENSED 1057
|
||||
#define IDC_EDIT_SC_Z 1058
|
||||
#define IDC_EDIT_Z_POSITION_EP02 1059
|
||||
#define IDC_EDIT_TS_0 1060
|
||||
#define IDC_BUTTON_MOVE_TO 1061
|
||||
#define IDC_EDIT_TS_1 1062
|
||||
#define IDC_EDIT_ZM_POSITION_EP02 1063
|
||||
#define IDC_EDIT_TS_2 1064
|
||||
#define IDC_EDIT_MOVE_TO_X 1065
|
||||
#define IDC_BUTTON_GET_INDEX2 1066
|
||||
#define IDC_EDIT_ACCEL_X 1067
|
||||
#define IDC_BUTTON_ENABLE_JOYSTICK 1068
|
||||
#define IDC_EDIT_MOVE_TO_Y 1069
|
||||
#define IDC_EDIT_MOVE_TO_Z 1070
|
||||
#define IDC_EDIT_X_INDEX 1071
|
||||
#define IDC_EDIT_ACCEL_Y 1072
|
||||
#define IDC_RADIO_MOVE_RELATIVE 1073
|
||||
#define IDC_EDIT_X_INDEX2 1074
|
||||
#define IDC_EDIT_RPX_POSITION 1075
|
||||
#define IDC_EDIT_Y_INDEX 1076
|
||||
#define IDC_EDIT_ACCEL_Z 1077
|
||||
#define IDC_EDIT_MOVE_TO_ZM 1078
|
||||
#define IDC_EDIT_RPY_POSITION 1079
|
||||
#define IDC_EDIT_Z_INDEX 1080
|
||||
#define IDC_EDIT_HWS_SPEED_X 1081
|
||||
#define IDC_RADIO_MOVE_ABSOLUTE 1082
|
||||
#define IDC_EDIT_Z_INDEX2 1083
|
||||
#define IDC_EDIT_RPZ_POSITION 1084
|
||||
#define IDC_EDIT_TSX 1085
|
||||
#define IDC_EDIT_ZM_INDEX 1086
|
||||
#define IDC_EDIT_TSY 1087
|
||||
#define IDC_RADIO_INCH 1088
|
||||
#define IDC_EDIT_ZM_INDEX2 1089
|
||||
#define IDC_EDIT_TS_XYZ 1090
|
||||
#define IDC_RADIO_MM 1091
|
||||
#define IDC_EDIT_TSZ 1092
|
||||
#define IDC_RADIO_FAST 1093
|
||||
#define IDC_RADIO_SPEED_FAST 1094
|
||||
#define IDC_EDIT_DECEL_X 1095
|
||||
#define IDC_EDIT_DECEL_Y 1096
|
||||
#define IDC_EDIT_DECEL_Z 1097
|
||||
#define IDC_RADIO_SPEED_SLOW 1770
|
||||
#define IDC_RADIO_SCALE 1772
|
||||
#define IDC_EDIT_SPEED_X 1773
|
||||
#define IDC_EDIT_SPEED_Y 1774
|
||||
#define IDC_EDIT_SPEED_Z 1775
|
||||
#define IDC_EDIT_ACC_X 1776
|
||||
#define IDC_EDIT_ACC_Y 1777
|
||||
#define IDC_EDIT_ACC_Z 1778
|
||||
#define IDC_EDIT_DEC_X 1779
|
||||
#define IDC_EDIT_DEC_Y 1780
|
||||
#define IDC_EDIT_DEC_Z 1781
|
||||
#define IDC_EDIT_MANUAL_SPEED_X 1782
|
||||
#define IDC_EDIT_MANUAL_SPEED_Y 1783
|
||||
#define IDC_EDIT_MANUAL_SPEED_Z 1784
|
||||
#define IDC_EDIT_MANUAL_ACC_X 1785
|
||||
#define IDC_EDIT_MANUAL_ACC_Y 1786
|
||||
#define IDC_EDIT_MANUAL_ACC_Z 1787
|
||||
#define IDC_EDIT_MANUAL_DEC_X 1788
|
||||
#define IDC_EDIT_MANUAL_DEC_Y 1789
|
||||
#define IDC_EDIT_MANUAL_DEC_Z 1790
|
||||
#define IDC_RADIO_SPEED_USER_DEFINED 1791
|
||||
#define IDC_CHECK_USE_MANUAL_MOTION_PARAMETERS 1792
|
||||
#define IDC_EDIT_MOVE_W 1793
|
||||
#define IDC_BUTTON_ALL_ON 1101
|
||||
#define IDC_BUTTON_ALL_OFF 1102
|
||||
#define IDC_POLLING_SPEEDTEST 1104
|
||||
@@ -214,11 +215,11 @@
|
||||
#define IDC_CHECK_CYCLE_STAGE 1145
|
||||
#define IDC_RADIO_DEDUPE 1146
|
||||
#define IDC_RADIO_HEX_ASCII2BIN 1149
|
||||
#define IDC_RADIO_2BIN 1149
|
||||
#define IDC_EDIT_MV_CONFIG_FILE 1150
|
||||
#define IDC_RADIO_DEMO_MODE 1152
|
||||
#define IDC_RADIO_DUMP_BINARY 1153
|
||||
#define IDC_BUTTON_GET_MV_CONFIG 1154
|
||||
#define IDC_RADIO_ENGINEERING_MODE 1156
|
||||
#define IDC_RADIO_DUMP_PRS 1154
|
||||
#define IDC_RADIO_MACHINE_MITUTOYO 1157
|
||||
#define IDC_EDIT_SNOOP_LOG 1160
|
||||
#define IDC_EDIT_SNOOP_LOG_FILE 1161
|
||||
@@ -227,6 +228,7 @@
|
||||
#define IDC_RADIO_UPDATE_MV_CONFIG 1168
|
||||
#define IDC_STATIC_MV_CONFIG 1169
|
||||
#define IDC_STATIC_USBSNOOP 1170
|
||||
#define IDC_STATIC_MV_CONFIG2 1170
|
||||
#define IDC_STATIC_DIAGNOSTICS 1171
|
||||
#define IDC_STATIC_REPLAY 1172
|
||||
#define IDC_STATIC_PROTOCOL_ANALYZER 1173
|
||||
@@ -290,7 +292,6 @@
|
||||
#define IDC_EDIT_ZM_AXIS 1219
|
||||
#define IDC_RADIO_SPEED_GEAR4 1222
|
||||
#define IDC_RADIO_MOVETEST 1222
|
||||
#define IDC_RADIO_HEX_BIN2ASCII 1222
|
||||
#define IDC_RADIO_SAMPLE_X 1222
|
||||
#define IDC_RADIO_VIDEOCARD_SDK3000 1222
|
||||
#define IDC_RADIO_RGB 1222
|
||||
@@ -633,176 +634,187 @@
|
||||
#define IDC_BUTTON_STATUS_POSERR_Y 1515
|
||||
#define IDC_BUTTON_STATUS_POSERR_Z 1516
|
||||
#define IDC_EDIT_REPETEST_DIS_TO 1517
|
||||
#define IDC_BUTTON1 1518
|
||||
#define IDC_BUTTON_ANIMATICS_HOME 1518
|
||||
#define IDC_BUTTON_START_SAMPLE_SCURVE 1518
|
||||
#define IDC_BUTTON_SAVE_PICTURE 1518
|
||||
#define IDC_BUTTON_SV2000E_SAVEFILE 1518
|
||||
#define IDC_BTN_CONFIGURE_CALIBRATEV 1518
|
||||
#define IDC_BUTTON_SETUP_SO7CONFIG 1518
|
||||
#define IDC_BUTTON_SCAN_KEYENCE_LK_GLASER 1518
|
||||
#define IDC_BUTTON_IMAGEDLL_START_SCAN_LASER 1518
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_START_MACHINE 1518
|
||||
#define IDC_BUTTON_PROGRAM_SET_ZERO_X 1518
|
||||
#define IDC_STATIC_CANVAS 1519
|
||||
#define IDC_BUTTON_SCAN_KEYENCE_LK_HLASER 1519
|
||||
#define IDC_BUTTON_STATUS_OVERHEAT_X 1520
|
||||
#define IDC_EDIT_SAMPLE_TIME_SCURVE 1520
|
||||
#define IDC_BUTTON_STATUS_OVERHEAT_Y 1521
|
||||
#define IDC_EDIT_SAMPLE_SCURVE_DIS 1521
|
||||
#define IDC_BUTTON_STATUS_OVERHEAT_Z 1522
|
||||
#define IDC_RADIO_SAMPLE_Y 1522
|
||||
#define IDC_RADIO_SAMPLE_Z 1523
|
||||
#define IDC_BUTTON2 1524
|
||||
#define IDC_BUTTON_STOP_SAMPLE_SCURVE 1524
|
||||
#define IDC_BTN_CONFIGURE_MOVEVOUT 1524
|
||||
#define IDC_BUTTON_STOP_SCAN_KEYENCE_LK_GLASER 1524
|
||||
#define IDC_BUTTON_IMAGEDLL_GET_SCAN_LASER_DATA 1524
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_STOP_MACHINE 1524
|
||||
#define IDC_BUTTON_SO7_TEST_Z_SIGNAL 1524
|
||||
#define IDC_BUTTON_PROGRAM_SET_ZERO_Y 1524
|
||||
#define IDC_CUSTOM1 1525
|
||||
#define IDC_CUSTOM_CANVAS 1525
|
||||
#define IDC_BUTTON_STOP_SCAN_KEYENCE_LK_HLASER 1525
|
||||
#define IDC_RADIO_CONTROLLER 1526
|
||||
#define IDC_RADIO_VIDEOCARD_SV2000E 1528
|
||||
#define IDC_RADIO_VIDEOCARD_TC4000 1529
|
||||
#define IDC_STATIC_SDK3000_PICTURE 1531
|
||||
#define IDC_RADIO_GRAY 1532
|
||||
#define IDC_RADIO_SV2000E_GRAY 1533
|
||||
#define IDC_BTN_CONFIGURE_MOVEVIN 1534
|
||||
#define IDC_EDIT_CONFIGURE_MSGOUT 1535
|
||||
#define IDC_EDIT_SO7CONFIG_ZOOMID 1536
|
||||
#define IDC_BUTTON_SO7CONFIG_SET_SPEED 1537
|
||||
#define IDC_BUTTON_SO7CONFIG_ZOOM_NEGLIMIT 1538
|
||||
#define IDC_BUTTON_SO7CONFIG_ZOOM_POSLIMIT 1539
|
||||
#define IDC_EDIT_SO7CONFIG_ZOOM_SLOWSPEED 1540
|
||||
#define IDC_EDIT_SO7CONFIG_ZOOM_PRECISION 1541
|
||||
#define IDC_BUTTON_SO7CONFIG_ZOOM_PRECISION 1542
|
||||
#define IDC_RADIO_SO7CONFIG_ZOOM_MOVE_SLOW 1543
|
||||
#define IDC_BUTTON_SO7CONFIG_STEP1 1544
|
||||
#define IDC_BUTTON_SO7CONFIG_STEP2 1545
|
||||
#define IDC_EDIT_SO7CONFIG_READZOOM 1546
|
||||
#define IDC_BUTTON_SO7CONFIG_SET_SUBDIVISION 1547
|
||||
#define IDC_EDIT_SO7CONFIG_MOTOR_SUBDIVISION 1548
|
||||
#define IDC_EDIT_TESTZOOM_PRODUCTID 1549
|
||||
#define IDC_RADIO_CANVAS_SPEED_TIME 1550
|
||||
#define IDC_RADIO_CANVAS_POSTION_TIME 1551
|
||||
#define IDC_EDIT_SET_PARAMETER_MSGOUTPUT 1552
|
||||
#define IDC_RADIO_KEYENCE_LASER 1553
|
||||
#define IDC_BUTTON_GET_SCAN_DATA_KEYENCE_LK_GLASER 1555
|
||||
#define IDC_EDIT_TEST_KEYENCE_MESSAGE 1556
|
||||
#define IDC_RADIO_MACHINE_KEYENCE_TM3000 1557
|
||||
#define IDC_BUTTON_GET_SCAN_DATA_KEYENCE_LK_HLASER 1557
|
||||
#define IDC_RADIO_KEYENCE_LASER_LK_G 1558
|
||||
#define IDC_RADIO_KEYENCE_LASER_LK_H 1559
|
||||
#define IDC_RADIO_TEST_IMAGE_DLL 1560
|
||||
#define IDC_BUTTON3 1562
|
||||
#define IDC_BUTTON_IMAGEDLL_PAUSE_AND_GET_SCAN_LASER_DATA 1562
|
||||
#define IDC_BUTTON_TEST_KEYENCE_SAVE_LOG 1562
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_SEND_DATA 1562
|
||||
#define IDC_BUTTON_SO7_CNC_PROGRAM 1562
|
||||
#define IDC_BUTTON_PROGRAM_SET_ZERO_Z 1562
|
||||
#define IDC_BUTTON_IMAGEDLL_STOP_SCAN_LASER 1563
|
||||
#define IDC_STATIC_TC4000_PICTURE 1564
|
||||
#define IDC_RADIO_SO7_IP_CAMERA 1565
|
||||
#define IDC_RADIO_TC4000_CHANNEL1 1566
|
||||
#define IDC_RADIO_TC4000_CHANNEL2 1567
|
||||
#define IDC_RADIO_TC4000_CHANNEL3 1568
|
||||
#define IDC_RADIO_TC4000_CHANNEL4 1569
|
||||
#define IDC_RADIO_SV2000E_CHANNEL1 1570
|
||||
#define IDC_RADIO_SV2000E_CHANNEL2 1571
|
||||
#define IDC_COMBO_SV200E 1573
|
||||
#define IDC_COMBO_SV2000E_SELECT_DEV_NUMBER 1573
|
||||
#define IDC_EDITTC4000_SET_DEINTERLACE 1574
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y1 1575
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_BOTTOMZ1 1576
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_STANDARD_VALUE 1577
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE 1578
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X1 1579
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X2 1580
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y2 1581
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_BOTTOMZ2 1582
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X3 1583
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y3 1584
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_BOTTOMZ3 1585
|
||||
#define IDC_BUTTON_IMAGEDLL_2LASER_CALCULATE 1586
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_XSHIFT 1587
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE2 1587
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_YSHIFT 1588
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE3 1588
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X4 1589
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y4 1590
|
||||
#define IDC_EDIT_TEST_LK_G_INTERVAL 1591
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X5 1591
|
||||
#define IDC_RADIO__SO7_RS232 1592
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y5 1592
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X6 1593
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y6 1594
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X7 1595
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y7 1596
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X8 1597
|
||||
#define IDC_EDIT_SO7_MANUAL_MACHINE_DATA 1598
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y8 1598
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_SEND_DATA_TYPE_HEX 1599
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X9 1599
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_SEND_DATA_TYPE_ANSCII 1600
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y9 1600
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD1 1601
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE4 1601
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD2 1602
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE5 1602
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD3 1603
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE6 1603
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_CLEAR_MSG 1604
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE7 1604
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_SAVE_MSG 1605
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE8 1605
|
||||
#define IDC_BUTTON_TEST_KEYENCE_CLEAR_LOG 1606
|
||||
#define IDC_BUTTON_KEYENCE_LASER_CALIBRATE_VALUE 1607
|
||||
#define IDC_EDIT_KEYENCE_LASER_CALIBRATE_VALUE 1608
|
||||
#define IDC_EDIT_KEYENCE_LASER_CALIBRATE_VALUE0 1609
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE9 1610
|
||||
#define IDC_BUTTON_KEYENCE_LASER_CALIBRATE_VALUE0 1610
|
||||
#define IDC_EDIT_TEST_KEYENCE_SETFOCUS 1650
|
||||
#define IDC_RADIO_SO7_VERIFICATION_ALGORITHM 1651
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINEREAD_POS 1652
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD4 1653
|
||||
#define IDC_RADIO_CANVAS_SPEED_POSTION 1654
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT1 1661
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT2 1662
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT3 1663
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT4 1664
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT5 1665
|
||||
#define IDC_RADIO_SPEED_GEAR5 1666
|
||||
#define IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS 1667
|
||||
#define IDC_RADIO_VIDEOCARD_SV4000E 1668
|
||||
#define IDC_RADIO_SV4000E_RGB 1669
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT6 1670
|
||||
#define IDC_RADIO_SV4000E_GRAY 1670
|
||||
#define IDC_RADIO_SV4000E_CHANNEL1 1671
|
||||
#define IDC_RADIO_SV4000E_CHANNEL2 1672
|
||||
#define IDC_RADIO_SV4000E_CHANNEL3 1673
|
||||
#define IDC_RADIO_SV4000E_CHANNEL4 1674
|
||||
#define IDC_SV4000E_CHECK_MIRROR_VERTICALLY 1675
|
||||
#define IDC_BUTTON_SV4000E_SAVEFILE 1676
|
||||
#define IDC_STATIC_SV4000E_PICTURE 1677
|
||||
#define IDC_CHECK_SO7_MOTION_OUTPUT_TIME 1678
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_X_LEFT 1682
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_X_RIGHT 1683
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Y_FRONTWARD 1684
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Y_BACKWARD 1685
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Z_UP 1686
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Z_DOWN 1687
|
||||
#define IDC_MFCBUTTON_SPEEDGEAR 1688
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_PLUS_SPEED 1691
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_MINUS_SPEED 1692
|
||||
#define IDC_LIST_REPORT_OUTPUT 1693
|
||||
#define IDC_RADIO1 1697
|
||||
#define IDC_RADIO_SO7_PROGRAM_MOVE 1697
|
||||
#define IDC_RADIO2 1698
|
||||
#define IIDC_RADIO_SO7_PROGRAM_MOVE_TO 1698
|
||||
#define IDC_EDIT_SO7_PROGRAM_Y_MOVETO 1699
|
||||
#define IDC_BUTTON_START_SAMPLE_SCURVE 1519
|
||||
#define IDC_BUTTON_SAVE_PICTURE 1520
|
||||
#define IDC_BUTTON_SV2000E_SAVEFILE 1521
|
||||
#define IDC_BTN_CONFIGURE_CALIBRATEV 1522
|
||||
#define IDC_BUTTON_SETUP_SO7CONFIG 1523
|
||||
#define IDC_BUTTON_SCAN_KEYENCE_LK_GLASER 1524
|
||||
#define IDC_BUTTON_IMAGEDLL_START_SCAN_LASER 1525
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_START_MACHINE 1526
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_STOP_MACHINE 1527
|
||||
#define IDC_BUTTON_PROGRAM_SET_ZERO_X 1528
|
||||
#define IDC_STATIC_CANVAS 1529
|
||||
#define IDC_BUTTON_SCAN_KEYENCE_LK_HLASER 1530
|
||||
#define IDC_BUTTON_STATUS_OVERHEAT_X 1531
|
||||
#define IDC_EDIT_SAMPLE_TIME_SCURVE 1532
|
||||
#define IDC_BUTTON_READ_ENVIRONMENT 1533
|
||||
#define IDC_BUTTON_STATUS_OVERHEAT_Y 1534
|
||||
#define IDC_EDIT_SAMPLE_SCURVE_DIS 1535
|
||||
#define IDC_BUTTON_WRITE_PROGRAM 1536
|
||||
#define IDC_BUTTON_STATUS_OVERHEAT_Z 1537
|
||||
#define IDC_RADIO_SAMPLE_Y 1538
|
||||
#define IDC_BUTTON_WRITE_ENVIRONMENT 1539
|
||||
#define IDC_RADIO_SAMPLE_Z 1540
|
||||
#define IDC_BUTTON_READ_IMAGE 1541
|
||||
#define IDC_BUTTON2 1542
|
||||
#define IDC_BUTTON_STOP_SAMPLE_SCURVE 1543
|
||||
#define IDC_BTN_CONFIGURE_MOVEVOUT 1544
|
||||
#define IDC_BUTTON_STOP_SCAN_KEYENCE_LK_GLASER 1545
|
||||
#define IDC_BUTTON_SET_TRIGGER 1546
|
||||
#define IDC_BUTTON_IMAGEDLL_GET_SCAN_LASER_DATA 1547
|
||||
#define IDC_BUTTON_SO7_TEST_Z_SIGNAL 1548
|
||||
#define IDC_BUTTON_PROGRAM_SET_ZERO_Y 1549
|
||||
#define IDC_CUSTOM1 1550
|
||||
#define IDC_CUSTOM_CANVAS 1551
|
||||
#define IDC_BUTTON_GET_MEAS_VALUE 1552
|
||||
#define IDC_BUTTON_STOP_SCAN_KEYENCE_LK_HLASER 1553
|
||||
#define IDC_RADIO_CONTROLLER 1554
|
||||
#define IDC_BUTTON_DO_MEASURE 1555
|
||||
#define IDC_BUTTON_INIT_PROGRAM 1556
|
||||
#define IDC_RADIO_VIDEOCARD_SV2000E 1557
|
||||
#define IDC_BUTTON_SETTINGS 1558
|
||||
#define IDC_RADIO_VIDEOCARD_TC4000 1559
|
||||
#define IDC_BUTTON_READ_SETTINGS 1560
|
||||
#define IDC_BUTTON_WRITE_SETTINGS 1561
|
||||
#define IDC_STATIC_SDK3000_PICTURE 1562
|
||||
#define IDC_RADIO_GRAY 1563
|
||||
#define IDC_RADIO_SV2000E_GRAY 1564
|
||||
#define IDC_BTN_CONFIGURE_MOVEVIN 1565
|
||||
#define IDC_EDIT_CONFIGURE_MSGOUT 1566
|
||||
#define IDC_EDIT_SO7CONFIG_ZOOMID 1567
|
||||
#define IDC_BUTTON_SO7CONFIG_SET_SPEED 1568
|
||||
#define IDC_BUTTON_SO7CONFIG_ZOOM_NEGLIMIT 1569
|
||||
#define IDC_BUTTON_SO7CONFIG_ZOOM_POSLIMIT 1570
|
||||
#define IDC_EDIT_SO7CONFIG_ZOOM_SLOWSPEED 1571
|
||||
#define IDC_EDIT_SO7CONFIG_ZOOM_PRECISION 1572
|
||||
#define IDC_BUTTON_SO7CONFIG_ZOOM_PRECISION 1573
|
||||
#define IDC_RADIO_SO7CONFIG_ZOOM_MOVE_SLOW 1574
|
||||
#define IDC_BUTTON_SO7CONFIG_STEP1 1575
|
||||
#define IDC_BUTTON_SO7CONFIG_STEP2 1576
|
||||
#define IDC_EDIT_SO7CONFIG_READZOOM 1577
|
||||
#define IDC_BUTTON_SO7CONFIG_SET_SUBDIVISION 1578
|
||||
#define IDC_EDIT_SO7CONFIG_MOTOR_SUBDIVISION 1579
|
||||
#define IDC_EDIT_TESTZOOM_PRODUCTID 1580
|
||||
#define IDC_RADIO_CANVAS_SPEED_TIME 1581
|
||||
#define IDC_RADIO_CANVAS_POSTION_TIME 1582
|
||||
#define IDC_EDIT_SET_PARAMETER_MSGOUTPUT 1583
|
||||
#define IDC_RADIO_KEYENCE_LASER_LK_G 1584
|
||||
#define IDC_BUTTON3 1585
|
||||
#define IDC_BUTTON_INIT_SCAN_KEYENCE_LK_GLASER 1586
|
||||
#define IDC_EDIT_MEASURE_VALUE 1587
|
||||
#define IDC_RADIO_OUT_EXTRACT 1588
|
||||
#define IDC_RADIO_KEYENCE_LASER 1589
|
||||
#define IDC_BUTTON_GET_SCAN_DATA_KEYENCE_LK_GLASER 1590
|
||||
#define IDC_EDIT_TEST_KEYENCE_MESSAGE 1591
|
||||
#define IDC_RADIO_MACHINE_KEYENCE_TM3000 1592
|
||||
#define IDC_BUTTON_GET_SCAN_DATA_KEYENCE_LK_HLASER 1593
|
||||
#define IDC_RADIO_KEYENCE_LASER_LK_H 1594
|
||||
#define IDC_RADIO_TEST_IMAGE_DLL 1595
|
||||
#define IDC_BUTTON_IMAGEDLL_PAUSE_AND_GET_SCAN_LASER_DATA 1596
|
||||
#define IDC_BUTTON_TEST_KEYENCE_SAVE_LOG 1597
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_SEND_DATA 1598
|
||||
#define IDC_BUTTON_SO7_CNC_PROGRAM 1599
|
||||
#define IDC_BUTTON_PROGRAM_SET_ZERO_Z 1600
|
||||
#define IDC_BUTTON_IMAGEDLL_STOP_SCAN_LASER 1601
|
||||
#define IDC_STATIC_TC4000_PICTURE 1602
|
||||
#define IDC_RADIO_SO7_IP_CAMERA 1603
|
||||
#define IDC_RADIO_TC4000_CHANNEL1 1604
|
||||
#define IDC_RADIO_TC4000_CHANNEL2 1605
|
||||
#define IDC_RADIO_TC4000_CHANNEL3 1606
|
||||
#define IDC_RADIO_TC4000_CHANNEL4 1607
|
||||
#define IDC_RADIO_SV2000E_CHANNEL1 1608
|
||||
#define IDC_RADIO_SV2000E_CHANNEL2 1609
|
||||
#define IDC_COMBO_SV200E 1610
|
||||
#define IDC_COMBO_SV2000E_SELECT_DEV_NUMBER 1611
|
||||
#define IDC_EDITTC4000_SET_DEINTERLACE 1612
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y1 1613
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_BOTTOMZ1 1614
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_STANDARD_VALUE 1615
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE 1616
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X1 1617
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X2 1618
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y2 1619
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_BOTTOMZ2 1620
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X3 1621
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y3 1622
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_BOTTOMZ3 1623
|
||||
#define IDC_BUTTON_IMAGEDLL_2LASER_CALCULATE 1624
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_XSHIFT 1625
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE2 1626
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_YSHIFT 1627
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE3 1628
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X4 1629
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y4 1630
|
||||
#define IDC_EDIT_TEST_LK_G_INTERVAL 1631
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X5 1632
|
||||
#define IDC_RADIO__SO7_RS232 1633
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y5 1634
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X6 1635
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y6 1636
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X7 1637
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y7 1638
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X8 1639
|
||||
#define IDC_EDIT_SO7_MANUAL_MACHINE_DATA 1640
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y8 1641
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_SEND_DATA_TYPE_HEX 1642
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_X9 1643
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_SEND_DATA_TYPE_ANSCII 1644
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_Y9 1645
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD1 1646
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE4 1647
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD2 1648
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE5 1649
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD3 1650
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE6 1651
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_CLEAR_MSG 1652
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE7 1653
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_SAVE_MSG 1654
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE8 1655
|
||||
#define IDC_BUTTON_TEST_KEYENCE_CLEAR_LOG 1656
|
||||
#define IDC_BUTTON_KEYENCE_LASER_CALIBRATE_VALUE 1657
|
||||
#define IDC_EDIT_KEYENCE_LASER_CALIBRATE_VALUE 1658
|
||||
#define IDC_EDIT_KEYENCE_LASER_CALIBRATE_VALUE0 1659
|
||||
#define IDC_EDIT_IMAGEDLL_2LASER_MEASURED_VALUE9 1660
|
||||
#define IDC_BUTTON_KEYENCE_LASER_CALIBRATE_VALUE0 1661
|
||||
#define IDC_EDIT_TEST_KEYENCE_SETFOCUS 1662
|
||||
#define IDC_RADIO_SO7_VERIFICATION_ALGORITHM 1663
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINEREAD_POS 1664
|
||||
#define IDC_RADIO_SO7_MANUAL_MACHINE_COMMON_CMD4 1665
|
||||
#define IDC_RADIO_CANVAS_SPEED_POSTION 1666
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT1 1667
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT2 1668
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT3 1669
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT4 1670
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT5 1671
|
||||
#define IDC_RADIO_SPEED_GEAR5 1672
|
||||
#define IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS 1673
|
||||
#define IDC_RADIO_VIDEOCARD_SV4000E 1674
|
||||
#define IDC_RADIO_SV4000E_RGB 1675
|
||||
#define IDC_MFCBUTTON_STATUS_IN_PORT6 1676
|
||||
#define IDC_RADIO_SV4000E_GRAY 1677
|
||||
#define IDC_RADIO_SV4000E_CHANNEL1 1678
|
||||
#define IDC_RADIO_SV4000E_CHANNEL2 1679
|
||||
#define IDC_RADIO_SV4000E_CHANNEL3 1680
|
||||
#define IDC_RADIO_SV4000E_CHANNEL4 1681
|
||||
#define IDC_SV4000E_CHECK_MIRROR_VERTICALLY 1682
|
||||
#define IDC_BUTTON_SV4000E_SAVEFILE 1683
|
||||
#define IDC_STATIC_SV4000E_PICTURE 1684
|
||||
#define IDC_CHECK_SO7_MOTION_OUTPUT_TIME 1685
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_X_LEFT 1686
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_X_RIGHT 1687
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Y_FRONTWARD 1688
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Y_BACKWARD 1689
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Z_UP 1690
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_Z_DOWN 1691
|
||||
#define IDC_MFCBUTTON_SPEEDGEAR 1692
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_PLUS_SPEED 1693
|
||||
#define IDC_MFCBUTTON_SO7_PROGRAM_MINUS_SPEED 1694
|
||||
#define IDC_LIST_REPORT_OUTPUT 1695
|
||||
#define IDC_RADIO_SO7_PROGRAM_MOVE 1696
|
||||
#define IIDC_RADIO_SO7_PROGRAM_MOVE_TO 1697
|
||||
#define IDC_EDIT_SO7_PROGRAM_Y_MOVETO 1698
|
||||
#define IDC_EDIT_SO7_PROGRAM_X_MOVETO 1700
|
||||
#define IDC_BUTTON_SO7_PROGRAM_ADD_CNC_PROGRAM 1701
|
||||
#define IDC_BUTTON_SO7_PROGRAM_RUN_CNC 1703
|
||||
@@ -814,16 +826,20 @@
|
||||
#define IDC_EDIT_READOUT_Y 1707
|
||||
#define IDC_BUTTON_SO7_PROGRAM_NEW_CNC 1710
|
||||
#define IDC_BUTTON_SO7_PROGRAM_SAVE_CNC_FILE 1711
|
||||
#define IDC_BUTTON_SO7_PROGRAM_OPEN_CNC 1712
|
||||
#define IDC_BUTTON_SO7_PROGRAM_OPEN_CNC 1712
|
||||
#define IDC_EDIT_SO7_PROGEAM_CNC_RUING_TIMES 1713
|
||||
|
||||
#define IDC_RADIO_MACHINE_TM_065 1714
|
||||
#define IDD_SO7_UTIL_IMAGE_DLL 1715
|
||||
#define IDD_SO7_UTIL_MANUAL_MACHINE 1716
|
||||
#define IDC_BUTTON_READ_PROGRAM 1717
|
||||
#define IDD_SO7_VIDEOCARD_TC4000 1718
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 188
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1714
|
||||
#define _APS_NEXT_CONTROL_VALUE 1793
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Usb_Util", "UsbUtil\Usb_Util.vcxproj", "{50B21A79-C887-4F7E-8911-7E3A685BFA25}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utility_Lite", "LITE\Utility_Lite\Utility_Lite.vcxproj", "{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -33,16 +31,6 @@ Global
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|Win32.Build.0 = Template|Win32
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|x64.ActiveCfg = Template|x64
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|x64.Build.0 = Template|x64
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.ReleaseSO7|Win32.ActiveCfg = ReleaseSO7|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.ReleaseSO7|x64.ActiveCfg = ReleaseSO7|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Template|Win32.Build.0 = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Template|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user