Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 279 → Rev 280

/cvi/instr/pw18-1.8aq/TMI_Api.h
0,0 → 1,144
//
// TEXIO USB488 Access Lib Ver1.00
//
// Copyright(c) 2010 NIKKE TECHNO SYSTEM CO.,LTD.
 
 
#include "StdAfx.h"
 
#define DLL_ERROR -1
#define IF_GPIB 1
#define IF_COM 2
 
 
class TMI_API
{
public:
// ƒfƒoƒCƒX‚̃I[ƒvƒ“
int TMI_HandleOpen(char * Str_Renamed, char * Ptr);
// ƒfƒoƒCƒX‚̃Nƒ[ƒY
int TMI_HandleClose(int hID);
// ƒ^ƒCƒ€ƒAƒEƒgŽžŠÔÝ’è
int TMI_TimeOut(int hID, int time);
// ƒŠƒtƒŒƒbƒVƒ…“®ì
int TMI_Refresh(int hID);
// ƒ‚ƒfƒ‹–¼‚̎擾
int TMI_ModelNameQ(int hID, char * Model);
// o—͈ʒu‚ƃvƒŠƒZƒbƒgˆÊ’u‚ðŽw’肵‚Ä“dˆ³’l‚ðÝ’è‚·‚é
int TMI_Voltage(int hID, unsigned char ch, unsigned char preset, double Data);
// o—͈ʒu‚ƃvƒŠƒZƒbƒgˆÊ’u‚ðŽw’肵‚Ä“dˆ³’l‚ðŽæ“¾‚·‚é
int TMI_VoltageQ(int hID, unsigned char ch, unsigned char preset, double * Voltage);
// o—͈ʒu‚ƃvƒŠƒZƒbƒgˆÊ’u‚ðŽw’肵‚Ä“d—¬’l‚ðÝ’è‚·‚é
int TMI_Current(int hID, unsigned char ch, unsigned char preset, double Data);
// o—͈ʒu‚ƃvƒŠƒZƒbƒgˆÊ’u‚ðŽw’肵‚Ä“d—¬’l‚ðŽæ“¾‚·‚é
int TMI_CurrentQ(int hID, unsigned char ch, unsigned char preset, double * Current);
// MainOutput‚ÌON OFF‚ðs‚¤
int TMI_MainOutput(int hID, unsigned char onoff);
// MainOutput‚̏ó‘Ô‚ðŽæ“¾‚·‚é
int TMI_MainOutputQ(int hID, unsigned char * Ans);
// Delay ‚ÌON OFF‚ðs‚¤
int TMI_Delay(int hID, unsigned char onoff);
// Delay‚̏ó‘Ô‚ðŽæ“¾‚·‚é
int TMI_DelayQ(int hID, unsigned char * Ans);
// OutputSelect‚̏o—Í•ÊON OFF‚ðs‚¤
int TMI_OutputSel(int hID, unsigned char ch, unsigned char onoff);
// OutputSelect‚̏o—͕ʂ̏ó‘Ô‚ðŽæ“¾‚·‚é
int TMI_OutputSelQ(int hID, unsigned char ch, unsigned char * Ans);
// Tracking‚ÌON OFF‚ðs‚¤
int TMI_TrackingOnOff(int hID, unsigned char onoff);
// Tracking‚̏ó‘Ô‚ðŽæ“¾‚·‚é
int TMI_TrackingOnOffQ(int hID, unsigned char * Ans);
// TrackingMode‚ðÝ’è‚·‚é
int TMI_TrackingMode(int hID, unsigned char mode);
// TrackingMode‚̏ó‘Ô‚ðŽæ“¾‚·‚é
int TMI_TrackingModeQ(int hID, unsigned char * Ans);
// TrackingGroup‚ðo—͕ʂɐݒ肷‚é
int TMI_TrackingGroup(int hID, unsigned char ch, unsigned char Tracking_Set);
// TrackingGroup‚̏o—͕ʐݒèó‘Ô‚ðŽæ“¾‚·‚é
int TMI_TrackingGroupQ(int hID, unsigned char ch, unsigned char * Ans);
// TrackingGroup‚Ì“dˆ³E“d—¬’l‚ðo—Í•Ê‚É‘Œ¸‚³‚¹‚é
int TMI_TrackingData(int hID, unsigned char ch, unsigned char va, double Data);
// TrackingGroup‚Ì“dˆ³E“d—¬’l‚ðo—͕ʂɎ擾‚·‚é
int TMI_TrackingDataQ(int hID, unsigned char ch, unsigned char va, double * Data);
// DELAYŽžŠÔ‚ðo—͕ʂɐݒ肷‚é
int TMI_DelayTime(int hID, unsigned char ch, double Data);
// DELAYŽžŠÔ‚ðo—͕ʂɎ擾‚·‚é
int TMI_DelayTimeQ(int hID, unsigned char ch, double * Data);
// Display•\Ž¦ˆÊ’u‚ðÝ’è‚·‚é
int TMI_Display(int hID, unsigned char ch);
// Display•\Ž¦ˆÊ’u‚ðŽæ“¾‚·‚é
int TMI_DisplayQ(int hID, unsigned char * Ans);
// Preset”ԍ†‚ðÝ’è‚·‚é
int TMI_Preset(int hID, unsigned char preset);
// Preset”ԍ†‚ðŽæ“¾‚·‚é
int TMI_PresetQ(int hID, unsigned char * Ans);
// Žw’肵‚½o—Í‚Ì“dˆ³E“d—¬ƒ‚ƒjƒ^’l‚ÆCV/CCó‘Ô‚ðŽæ“¾‚·‚é
int TMI_MoniDataQ(int hID, unsigned char ch, double * Voltage, double * Current, unsigned char * cv_cc);
// ƒVƒXƒeƒ€ƒAƒhƒŒƒX‚ðŽæ“¾‚·‚é
int TMI_AdrQ(int hID, unsigned char * Adr);
// ƒŠƒ‚[ƒg‚©‚烍[ƒJƒ‹‚֐؂è‘Ö‚¦‚é
int TMI_RemoteLocal(int hID);
// ƒ[ƒJƒ‹ƒƒbƒNƒAƒEƒgó‘Ԃֈڍs‚·‚é
int TMI_LocalLockOut(int hID);
// ƒf[ƒ^‚̃oƒbƒNƒAƒbƒv‚ðs‚¤
int TMI_DataBackUp(int hID);
// ƒT[ƒrƒXƒŠƒNƒGƒXƒg‚Ì‹ÖŽ~E‹–‰Â‚̐ݒè‚ð‚·‚é
int TMI_SRQEnable(int hID, unsigned char ch);
// ‘So—Í‚ÌPRESET’l‚̎擾
int TMI_AllPresetQ(int hID, double * PresetMem);
// ‘So—Í‚ÌPRESET’l‚̎擾
int TMI_AllPresetQS(int hID, char * PresetMem);
// ƒRƒ“ƒgƒ[ƒ‹ŠÖ”FƒRƒ}ƒ“ƒh‘—M
int TMI_Out(int hID, char * Str_Renamed);
// ƒRƒ“ƒgƒ[ƒ‹ŠÖ”FƒRƒ}ƒ“ƒhŽóM
int TMI_In(int hID, char * strbuf);
 
BOOL IFInitialize();
 
TMI_API();
virtual ~TMI_API();
HINSTANCE m_TMI_APIDll;
 
int ( __stdcall* m_TMI_HandleOpen )( char * , char * );
int ( __stdcall* m_TMI_HandleClose )( int );
int ( __stdcall* m_TMI_TimeOut )( int , int );
int ( __stdcall* m_TMI_Refresh )( int );
int ( __stdcall* m_TMI_ModelNameQ )( int , char * );
int ( __stdcall* m_TMI_Voltage )( int , unsigned char , unsigned char , double );
int ( __stdcall* m_TMI_VoltageQ )( int , unsigned char , unsigned char , double * );
int ( __stdcall* m_TMI_Current )(int , unsigned char , unsigned char , double );
int ( __stdcall* m_TMI_CurrentQ )(int , unsigned char , unsigned char , double * );
int ( __stdcall* m_TMI_MainOutput )(int , unsigned char );
int ( __stdcall* m_TMI_MainOutputQ )(int , unsigned char * );
int ( __stdcall* m_TMI_Delay )(int , unsigned char );
int ( __stdcall* m_TMI_DelayQ )(int , unsigned char * );
int ( __stdcall* m_TMI_OutputSel )(int , unsigned char , unsigned char );
int ( __stdcall* m_TMI_OutputSelQ )(int , unsigned char , unsigned char * );
int ( __stdcall* m_TMI_TrackingOnOff )(int , unsigned char );
int ( __stdcall* m_TMI_TrackingOnOffQ )(int , unsigned char * );
int ( __stdcall* m_TMI_TrackingMode )(int , unsigned char );
int ( __stdcall* m_TMI_TrackingModeQ )(int , unsigned char * );
int ( __stdcall* m_TMI_TrackingGroup )(int , unsigned char , unsigned char );
int ( __stdcall* m_TMI_TrackingGroupQ )(int , unsigned char , unsigned char * );
int ( __stdcall* m_TMI_TrackingData )(int , unsigned char , unsigned char , double );
int ( __stdcall* m_TMI_TrackingDataQ )(int , unsigned char , unsigned char , double * );
int ( __stdcall* m_TMI_DelayTime )(int , unsigned char , double );
int ( __stdcall* m_TMI_DelayTimeQ )(int , unsigned char , double * );
int ( __stdcall* m_TMI_Display )(int , unsigned char );
int ( __stdcall* m_TMI_DisplayQ )(int , unsigned char * );
int ( __stdcall* m_TMI_Preset )(int , unsigned char );
int ( __stdcall* m_TMI_PresetQ )(int , unsigned char * );
int ( __stdcall* m_TMI_MoniDataQ )(int , unsigned char , double * , double * , unsigned char * );
int ( __stdcall* m_TMI_AdrQ )(int , unsigned char * );
int ( __stdcall* m_TMI_RemoteLocal )(int );
int ( __stdcall* m_TMI_LocalLockOut )(int );
int ( __stdcall* m_TMI_DataBackUp )(int );
int ( __stdcall* m_TMI_SRQEnable )(int , unsigned char );
int ( __stdcall* m_TMI_AllPresetQ )(int , double * );
int ( __stdcall* m_TMI_AllPresetQS )(int , char * );
int ( __stdcall* m_TMI_Out )(int , char * );
int ( __stdcall* m_TMI_In )(int , char * );
 
};
/cvi/instr/pw18-1.8aq/pw18-1.8aq-ctrl.h
0,0 → 1,77
/**************************************************************************/
/* LabWindows/CVI User Interface Resource (UIR) Include File */
/* */
/* WARNING: Do not add to, delete from, or otherwise modify the contents */
/* of this include file. */
/**************************************************************************/
 
#include <userint.h>
 
#ifdef __cplusplus
extern "C" {
#endif
 
/* Panels and Controls: */
 
#define P1 1
#define P1_EXIT 2 /* control type: command, callback function: ExitCB */
#define P1_U_4 3 /* control type: numeric, callback function: (none) */
#define P1_I_4 4 /* control type: numeric, callback function: (none) */
#define P1_BOX_4 5 /* control type: radioButton, callback function: SetMaskCB */
#define P1_U_3 6 /* control type: numeric, callback function: (none) */
#define P1_IMON_4 7 /* control type: numeric, callback function: (none) */
#define P1_VMON_4 8 /* control type: numeric, callback function: (none) */
#define P1_I_3 9 /* control type: numeric, callback function: (none) */
#define P1_BOX_3 10 /* control type: radioButton, callback function: SetMaskCB */
#define P1_U_2 11 /* control type: numeric, callback function: (none) */
#define P1_IMON_3 12 /* control type: numeric, callback function: (none) */
#define P1_VMON_3 13 /* control type: numeric, callback function: (none) */
#define P1_I_2 14 /* control type: numeric, callback function: (none) */
#define P1_BOX_2 15 /* control type: radioButton, callback function: SetMaskCB */
#define P1_U_1 16 /* control type: numeric, callback function: (none) */
#define P1_IMON_2 17 /* control type: numeric, callback function: (none) */
#define P1_VMON_2 18 /* control type: numeric, callback function: (none) */
#define P1_I_1 19 /* control type: numeric, callback function: (none) */
#define P1_BOX_1 20 /* control type: radioButton, callback function: SetMaskCB */
#define P1_READ 21 /* control type: command, callback function: ReadCB */
#define P1_SET 22 /* control type: command, callback function: SetCB */
#define P1_IMON_1 23 /* control type: numeric, callback function: (none) */
#define P1_VMON_1 24 /* control type: numeric, callback function: (none) */
#define P1_TIMERON 25 /* control type: binary, callback function: TimerOnOffCB */
#define P1_LOG 26 /* control type: radioButton, callback function: LogToFileCB */
#define P1_CVCC_4 27 /* control type: LED, callback function: (none) */
#define P1_CVCC_3 28 /* control type: LED, callback function: (none) */
#define P1_CVCC_2 29 /* control type: LED, callback function: (none) */
#define P1_CVCC_1 30 /* control type: LED, callback function: (none) */
#define P1_TIMER 31 /* control type: timer, callback function: TimerCB */
#define P1_ONOFF 32 /* control type: binary, callback function: SwitchOnOffCB */
#define P1_TINTERVAL 33 /* control type: numeric, callback function: SetIntervalCB */
#define P1_GRAPH 34 /* control type: strip, callback function: (none) */
 
 
/* Control Arrays: */
 
/* (no control arrays in the resource file) */
 
 
/* Menu Bars, Menus, and Menu Items: */
 
/* (no menu bars in the resource file) */
 
 
/* Callback Prototypes: */
 
int CVICALLBACK ExitCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK LogToFileCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK ReadCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK SetCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK SetIntervalCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK SetMaskCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK SwitchOnOffCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK TimerCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
int CVICALLBACK TimerOnOffCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 
 
#ifdef __cplusplus
}
#endif
/cvi/instr/pw18-1.8aq/pw18-1.8aq-ctrl.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: pw18-1.8aq/pw18-1.8aq.c
===================================================================
--- pw18-1.8aq/pw18-1.8aq.c (nonexistent)
+++ pw18-1.8aq/pw18-1.8aq.c (revision 280)
@@ -0,0 +1,578 @@
+#include <userint.h>
+#include "pw18-1.8aq-ctrl.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <windows.h>
+#include <pw18-1.8aq.h>
+
+int TMI_DeviceId=0;
+
+
+
+
+
+int TMI_Initialize()
+{
+
+ TMI_HandleOpen = NULL;
+ TMI_HandleClose = NULL;
+ TMI_TimeOut = NULL;
+ TMI_Refresh = NULL;
+ TMI_ModelNameQ = NULL;
+ TMI_Voltage = NULL;
+ TMI_VoltageQ = NULL;
+ TMI_Current = NULL;
+ TMI_CurrentQ = NULL;
+ TMI_MainOutput = NULL;
+ TMI_MainOutputQ = NULL;
+ TMI_Delay = NULL;
+ TMI_DelayQ = NULL;
+ TMI_OutputSel = NULL;
+ TMI_OutputSelQ = NULL;
+ TMI_TrackingOnOff = NULL;
+ TMI_TrackingOnOffQ = NULL;
+ TMI_TrackingMode = NULL;
+ TMI_TrackingModeQ = NULL;
+ TMI_TrackingGroup = NULL;
+ TMI_TrackingGroupQ = NULL;
+ TMI_TrackingData = NULL;
+ TMI_TrackingDataQ = NULL;
+ TMI_DelayTime = NULL;
+ TMI_DelayTimeQ = NULL;
+ TMI_Display = NULL;
+ TMI_DisplayQ = NULL;
+ TMI_Preset = NULL;
+ TMI_PresetQ = NULL;
+ TMI_MoniDataQ = NULL;
+ TMI_AdrQ = NULL;
+ TMI_RemoteLocal = NULL;
+ TMI_LocalLockOut = NULL;
+ TMI_DataBackUp = NULL;
+ TMI_SRQEnable = NULL;
+ TMI_AllPresetQ = NULL;
+ TMI_AllPresetQS = NULL;
+ TMI_Out = NULL;
+ TMI_In = NULL;
+ return 0;
+}
+
+
+int TMI_Test()
+{
+ char str[0xFF];
+ if (TMI_HandleOpen == NULL ) return FALSE;
+ if (TMI_HandleClose == NULL ) return FALSE;
+ if (TMI_TimeOut == NULL ) return FALSE;
+ if (TMI_Refresh == NULL ) return FALSE;
+ if (TMI_ModelNameQ == NULL ) return FALSE;
+ if (TMI_Voltage == NULL ) return FALSE;
+ if (TMI_VoltageQ == NULL ) return FALSE;
+ if (TMI_Current == NULL ) return FALSE;
+ if (TMI_CurrentQ == NULL ) return FALSE;
+ if (TMI_MainOutput == NULL ) return FALSE;
+ if (TMI_MainOutputQ == NULL ) return FALSE;
+ if (TMI_Delay == NULL ) return FALSE;
+ if (TMI_DelayQ == NULL ) return FALSE;
+ if (TMI_OutputSel == NULL ) return FALSE;
+ if (TMI_OutputSelQ == NULL ) return FALSE;
+ if (TMI_TrackingOnOff == NULL ) return FALSE;
+ if (TMI_TrackingOnOffQ == NULL ) return FALSE;
+ if (TMI_TrackingMode == NULL ) return FALSE;
+ if (TMI_TrackingModeQ == NULL ) return FALSE;
+ if (TMI_TrackingGroup == NULL ) return FALSE;
+ if (TMI_TrackingGroupQ == NULL ) return FALSE;
+ if (TMI_TrackingData == NULL ) return FALSE;
+ if (TMI_TrackingDataQ == NULL ) return FALSE;
+ if (TMI_DelayTime == NULL ) return FALSE;
+ if (TMI_DelayTimeQ == NULL ) return FALSE;
+ if (TMI_Display == NULL ) return FALSE;
+ if (TMI_DisplayQ == NULL ) return FALSE;
+ if (TMI_Preset == NULL ) return FALSE;
+ if (TMI_PresetQ == NULL ) return FALSE;
+ if (TMI_MoniDataQ == NULL ) return FALSE;
+ if (TMI_AdrQ == NULL ) return FALSE;
+ if (TMI_RemoteLocal == NULL ) return FALSE;
+ if (TMI_LocalLockOut == NULL ) return FALSE;
+ if (TMI_DataBackUp == NULL ) return FALSE;
+ if (TMI_SRQEnable == NULL ) return FALSE;
+ if (TMI_AllPresetQ == NULL ) return FALSE;
+ if (TMI_AllPresetQS == NULL ) return FALSE;
+ if (TMI_Out == NULL ) return FALSE;
+ if (TMI_In == NULL ) return FALSE;
+ TMI_ModelNameQ(TMI_DeviceId, str);
+ printf("TMI_ModelNameQ %s\n",str);
+ return TRUE;
+}
+
+int TMI_Close()
+{
+
+
+ if(TMI_APIDll != NULL) {
+ if (TMI_DeviceId){
+
+ TMI_RemoteLocal(TMI_DeviceId);
+ TMI_HandleClose(TMI_DeviceId);
+ TMI_DeviceId = 0;
+ }
+ FreeLibrary(TMI_APIDll);
+ }
+ return 0;
+}
+
+int TMI_Open()
+{
+ TMI_Initialize();
+ printf("FALSE =%d TRUE=%d\n", FALSE, TRUE);
+ TMI_APIDll=LoadLibrary((LPCSTR)"TMI_API.dll");
+ if( TMI_APIDll == NULL )
+ return FALSE;
+
+ TMI_HandleOpen = (int ( __stdcall* )( char * , char * )) GetProcAddress(TMI_APIDll , "TMI_HandleOpen");
+ if( TMI_HandleOpen == NULL )
+ return FALSE;
+
+ TMI_TimeOut = (int ( __stdcall* )( int , int )) GetProcAddress(TMI_APIDll , "TMI_TimeOut");
+ if( TMI_TimeOut == NULL )
+ return FALSE;
+
+ TMI_Refresh = (int ( __stdcall* )( int )) GetProcAddress(TMI_APIDll , "TMI_Refresh");
+ if( TMI_Refresh == NULL )
+ return FALSE;
+
+ TMI_ModelNameQ = (int ( __stdcall* )( int , char * )) GetProcAddress(TMI_APIDll , "TMI_ModelNameQ");
+ if( TMI_ModelNameQ == NULL )
+ return FALSE;
+
+ TMI_Voltage = (int ( __stdcall* )( int , unsigned char , unsigned char , double )) GetProcAddress(TMI_APIDll , "TMI_Voltage");
+ if( TMI_Voltage == NULL )
+ return FALSE;
+
+ TMI_VoltageQ = (int ( __stdcall* )( int , unsigned char , unsigned char , double * )) GetProcAddress(TMI_APIDll , "TMI_VoltageQ");
+ if( TMI_VoltageQ == NULL )
+ return FALSE;
+
+ TMI_Current = (int ( __stdcall* )(int , unsigned char , unsigned char , double )) GetProcAddress(TMI_APIDll , "TMI_Current");
+ if( TMI_Current == NULL )
+ return FALSE;
+
+ TMI_CurrentQ = (int ( __stdcall* )(int , unsigned char , unsigned char , double * )) GetProcAddress(TMI_APIDll , "TMI_CurrentQ");
+ if( TMI_CurrentQ == NULL )
+ return FALSE;
+
+ TMI_MainOutput = (int ( __stdcall* )(int , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_MainOutput");
+ if( TMI_MainOutput == NULL )
+ return FALSE;
+
+ TMI_MainOutputQ = (int ( __stdcall* )(int , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_MainOutputQ");
+ if( TMI_MainOutputQ == NULL )
+ return FALSE;
+
+ TMI_Delay = (int ( __stdcall* )(int , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_Delay");
+ if( TMI_Delay == NULL )
+ return FALSE;
+
+ TMI_DelayQ = (int ( __stdcall* )(int , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_DelayQ");
+ if( TMI_DelayQ == NULL )
+ return FALSE;
+
+ TMI_OutputSel = (int ( __stdcall* )(int , unsigned char , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_OutputSel");
+ if( TMI_OutputSel == NULL )
+ return FALSE;
+
+ TMI_OutputSelQ = (int ( __stdcall* )(int , unsigned char , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_OutputSelQ");
+ if( TMI_OutputSelQ == NULL )
+ return FALSE;
+
+ TMI_TrackingOnOff = (int ( __stdcall* )(int , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_TrackingOnOff");
+ if( TMI_TrackingOnOff == NULL )
+ return FALSE;
+
+ TMI_TrackingOnOffQ = (int ( __stdcall* )(int , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_TrackingOnOffQ");
+ if( TMI_TrackingOnOffQ == NULL )
+ return FALSE;
+
+ TMI_TrackingMode = (int ( __stdcall* )(int , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_TrackingMode");
+ if( TMI_TrackingMode == NULL )
+ return FALSE;
+
+ TMI_TrackingModeQ = (int ( __stdcall* )(int , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_TrackingModeQ");
+ if( TMI_TrackingModeQ == NULL )
+ return FALSE;
+
+ TMI_TrackingGroup = (int ( __stdcall* )(int , unsigned char , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_TrackingGroup");
+ if( TMI_TrackingGroup == NULL )
+ return FALSE;
+
+ TMI_TrackingGroupQ = (int ( __stdcall* )(int , unsigned char , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_TrackingGroupQ");
+ if( TMI_TrackingGroupQ == NULL )
+ return FALSE;
+
+ TMI_TrackingData = (int ( __stdcall* )(int , unsigned char , unsigned char , double )) GetProcAddress(TMI_APIDll , "TMI_TrackingData");
+ if( TMI_TrackingData == NULL )
+ return FALSE;
+
+ TMI_TrackingDataQ = (int ( __stdcall* )(int , unsigned char , unsigned char , double * )) GetProcAddress(TMI_APIDll , "TMI_TrackingDataQ");
+ if( TMI_TrackingDataQ == NULL )
+ return FALSE;
+
+ TMI_DelayTime = (int ( __stdcall* )(int , unsigned char , double )) GetProcAddress(TMI_APIDll , "TMI_DelayTime");
+ if( TMI_DelayTime == NULL )
+ return FALSE;
+
+ TMI_DelayTimeQ = (int ( __stdcall* )(int , unsigned char , double * )) GetProcAddress(TMI_APIDll , "TMI_DelayTimeQ");
+ if( TMI_DelayTimeQ == NULL )
+ return FALSE;
+
+ TMI_Display = (int ( __stdcall* )(int , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_Display");
+ if( TMI_Display == NULL )
+ return FALSE;
+
+ TMI_DisplayQ = (int ( __stdcall* )(int , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_DisplayQ");
+ if( TMI_DisplayQ == NULL )
+ return FALSE;
+
+ TMI_Preset = (int ( __stdcall* )(int , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_Preset");
+ if( TMI_Preset == NULL )
+ return FALSE;
+
+ TMI_PresetQ = (int ( __stdcall* )(int , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_PresetQ");
+ if( TMI_PresetQ == NULL )
+ return FALSE;
+
+ TMI_MoniDataQ = (int ( __stdcall* )(int , char , double * , double * , char * )) GetProcAddress(TMI_APIDll , "TMI_MoniDataQ");
+ if( TMI_MoniDataQ == NULL )
+ return FALSE;
+
+ TMI_AdrQ = (int ( __stdcall* )(int , unsigned char * )) GetProcAddress(TMI_APIDll , "TMI_AdrQ");
+ if( TMI_AdrQ == NULL )
+ return FALSE;
+
+ TMI_RemoteLocal = (int ( __stdcall* )(int )) GetProcAddress(TMI_APIDll , "TMI_RemoteLocal");
+ if( TMI_RemoteLocal == NULL )
+ return FALSE;
+
+ TMI_LocalLockOut = (int ( __stdcall* )(int )) GetProcAddress(TMI_APIDll , "TMI_LocalLockOut");
+ if( TMI_LocalLockOut == NULL )
+ return FALSE;
+
+ TMI_DataBackUp = (int ( __stdcall* )(int )) GetProcAddress(TMI_APIDll , "TMI_DataBackUp");
+ if( TMI_DataBackUp == NULL )
+ return FALSE;
+
+ TMI_SRQEnable = (int ( __stdcall* )(int , unsigned char )) GetProcAddress(TMI_APIDll , "TMI_SRQEnable");
+ if( TMI_SRQEnable == NULL )
+ return FALSE;
+
+ TMI_AllPresetQ = (int ( __stdcall* )(int , double * )) GetProcAddress(TMI_APIDll , "TMI_AllPresetQ");
+ if( TMI_AllPresetQ == NULL )
+ return FALSE;
+
+ TMI_AllPresetQS = (int ( __stdcall* )(int , char * )) GetProcAddress(TMI_APIDll , "TMI_AllPresetQS");
+ if( TMI_AllPresetQS == NULL )
+ return FALSE;
+
+ TMI_Out = (int ( __stdcall* )(int , char * )) GetProcAddress(TMI_APIDll , "TMI_Out");
+ if( TMI_Out == NULL )
+ return FALSE;
+
+ TMI_In = (int ( __stdcall* )(int , char * )) GetProcAddress(TMI_APIDll , "TMI_In");
+ if( TMI_In == NULL )
+ return FALSE;
+
+ TMI_HandleClose = (int ( __stdcall* )( int )) GetProcAddress(TMI_APIDll , "TMI_HandleClose");
+ if( TMI_HandleClose == NULL )
+ return FALSE;
+
+ printf("TMI_In loaded.\n");
+ return TRUE;
+}
+
+int TMI_OpenHandle(char * dev, char * usb ){
+
+TMI_DeviceId = TMI_HandleOpen(dev, usb);
+return TMI_DeviceId;
+}
+
+
+
+
+/****************TOKOVI (potek, kako se spreminjajo tokovi s casom)****************/
+
+void TMI_ReadCurrent(double * I , double * V, unsigned char * mode, unsigned char *onoff){
+ int iRet;
+ char ch=0;
+ double Voltage;
+ double Current;
+ char cv_cc;
+
+
+ iRet = TMI_TimeOut(TMI_DeviceId, 1);
+ iRet = TMI_Refresh(TMI_DeviceId);
+
+
+ //iRet = TMI_MainOutput(TMI_DeviceId, Output);
+ //iRet = TMI_MainOutputQ(TMI_DeviceId, &Output);
+ for (ch=0;ch<4;ch++){
+
+
+ iRet = TMI_MoniDataQ(TMI_DeviceId, ch+1, &Voltage, &Current, &cv_cc);
+ //if (debug) printf("[%d] %g V %g A CVCC %d\t",ch, Voltage, Current, cv_cc );
+ I[ch]= Current; //s tem definiras kaj sta I in V.
+ V[ch]= Voltage;
+
+
+ }
+ //if (debug) printf("\n");
+
+
+ return;
+
+
+}
+
+
+#ifdef MAIN
+
+#include <ansi_c.h>
+#include <utility.h>
+#include "pw18-1.8aq-ctrl.h"
+
+#define RSTREG(a,x) (a&=(~(x)))
+#define SETREG(a,x) (a|=x)
+
+int gLogToFile;
+int vmon[4]={P1_VMON_1,P1_VMON_2,P1_VMON_3,P1_VMON_4 };
+int imon[4]={P1_IMON_1,P1_IMON_2,P1_IMON_3,P1_IMON_4 };
+int vset[4]={P1_U_1,P1_U_2,P1_U_3,P1_U_4 };
+int iset[4]={P1_I_1,P1_I_2,P1_I_3,P1_I_4 };
+int radiob[4]={P1_BOX_1,P1_BOX_2,P1_BOX_3,P1_BOX_4 };
+
+int cvcc[4]={P1_CVCC_1,P1_CVCC_2,P1_CVCC_3,P1_CVCC_4 };
+const unsigned char Pre_1 = 1;
+int gMask=0xF;
+
+int pnl;
+FILE *gFp;
+int main (int argc, char *argv[])
+{
+ int DeviceId=0;
+ unsigned char MainOutput;
+ double Voltage, Current, tinterval;
+ char str[0xFF];
+ if (InitCVIRTE (0, argv, 0) == 0)
+ return -1; /* out of memory */
+ SetStdioPort (CVI_STDIO_WINDOW);
+ if ((pnl = LoadPanel (0, "pw18-1.8aq-ctrl.uir", P1)) < 0) return -1;
+
+ if (TMI_Open()== 0) MessagePopup("Error","Cannot open USB device");
+ DeviceId = TMI_OpenHandle ("PW-A","USB:1:1");
+ if (TMI_Test() == 0 )MessagePopup("DLL error","Dll Error");
+ if (DeviceId < 0) MessagePopup("Error","Not Connected");
+ printf("TMI device ID %d\n",TMI_DeviceId);
+
+ TMI_MainOutputQ(TMI_DeviceId, &MainOutput);
+ SetCtrlVal(pnl, P1_ONOFF, MainOutput);
+ GetCtrlVal(pnl, P1_TINTERVAL, &tinterval);
+ SetCtrlAttribute (pnl, P1_TIMER, ATTR_INTERVAL, tinterval);
+
+ for (unsigned char ch=0;ch<4;ch++){
+ int ison;
+ TMI_VoltageQ(TMI_DeviceId, ch+1, Pre_1, &Voltage);
+ TMI_CurrentQ(TMI_DeviceId, ch+1, Pre_1, &Current);
+ SetCtrlVal(pnl, vset[ch], Voltage);
+ SetCtrlVal(pnl, iset[ch], Current);
+ GetCtrlVal(pnl, radiob[ch], &ison);
+ if (ison) SETREG(gMask,(1<<ch)); else RSTREG(gMask,(1<<ch));
+ }
+
+ DisplayPanel (pnl);
+ RunUserInterface ();
+ DiscardPanel (pnl);
+ TMI_Close();
+
+ if (gFp) fclose(gFp);
+ return 0;
+}
+
+
+
+
+int CVICALLBACK SwitchOnOffCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{
+ unsigned char state;
+ switch (event)
+ {
+ case EVENT_COMMIT:
+ GetCtrlVal(panel, control, &state);
+ TMI_MainOutput(TMI_DeviceId, state);
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK SetCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{
+
+
+ switch (event)
+ {
+ case EVENT_COMMIT:
+
+ for (unsigned char ch = 0; ch<4;ch++){
+ //printf("ch %d %x\n", ch, gMask);
+ if (gMask & (1<<ch)){
+ double Voltage;
+ double Current;
+ GetCtrlVal(panel, vset[ch], &Voltage);
+ GetCtrlVal(panel, iset[ch], &Current);
+ printf("->ch %d VSet %g Iset %g\n", ch, Voltage, Current);
+ TMI_Voltage(TMI_DeviceId, ch+1, Pre_1, Voltage);
+ TMI_VoltageQ(TMI_DeviceId, ch+1, Pre_1, &Voltage);
+ TMI_Current(TMI_DeviceId, ch+1, Pre_1, Current);
+ TMI_CurrentQ(TMI_DeviceId, ch+1, Pre_1, &Current);
+ printf("<-ch %d VSet %g Iset %g\n", ch, Voltage, Current);
+
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK ReadCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{
+
+ int iRet;
+ char ch=0;
+ double Voltage;
+ double Current;
+ char cv_cc;
+ switch (event)
+ {
+ case EVENT_COMMIT:
+ for (ch = 0; ch<4;ch++){
+ if (gMask & (1<<ch)){
+ iRet = TMI_TimeOut(TMI_DeviceId, 1);
+ iRet = TMI_Refresh(TMI_DeviceId);
+ iRet = TMI_MoniDataQ(TMI_DeviceId, ch+1, &Voltage, &Current, &cv_cc);
+ printf("ch %d VSet %g Iset %g\n", ch, Voltage, Current);
+ SetCtrlVal(panel, vmon[ch], Voltage);
+ SetCtrlVal(panel, imon[ch], Current);
+ SetCtrlVal(panel, cvcc[ch], cv_cc);
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK SetIntervalCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2) {
+ double tinterval;
+ switch (event) {
+ case EVENT_COMMIT:
+ GetCtrlVal(panel, control, &tinterval);
+ SetCtrlAttribute (panel, P1_TIMER, ATTR_INTERVAL, tinterval);
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK TimerOnOffCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{
+ int state;
+ switch (event)
+ {
+ case EVENT_COMMIT:
+ GetCtrlVal(panel, control, &state);
+ if (state){
+ ResumeTimerCallbacks();
+ } else {
+ SuspendTimerCallbacks ();
+ printf ("Disabling timer....\n");
+ }
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK ExitCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{
+ switch (event)
+ {
+ case EVENT_COMMIT:
+ QuitUserInterface(0);
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK SetMaskCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{ int ison;
+ switch (event)
+ {
+ case EVENT_COMMIT:
+ GetCtrlVal(panel, control, &ison);
+ for (int i=0;i<4;i++) if (control == radiob[i]) break;
+ if (ison) SETREG(gMask,(1<<i)); else RSTREG(gMask,(1<<i));
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK LogToFileCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{
+
+ switch (event)
+ {
+ case EVENT_COMMIT:
+ GetCtrlVal(panel, control, &gLogToFile);
+
+ break;
+ }
+ return 0;
+}
+
+int CVICALLBACK TimerCB (int panel, int control, int event,
+ void *callbackData, int eventData1, int eventData2)
+{
+ switch (event)
+ {
+
+ unsigned char ch;
+ double current[4];
+ double voltage;
+ char cv_cc;
+ case EVENT_TIMER_TICK:
+ for (ch = 0; ch<4;ch++){
+ if (gMask & (1<<ch)){
+ TMI_TimeOut(TMI_DeviceId, 1);
+ TMI_Refresh(TMI_DeviceId);
+ TMI_MoniDataQ(TMI_DeviceId, ch+1, &voltage, &current[ch], &cv_cc);
+ SetCtrlVal(panel, vmon[ch], voltage);
+ SetCtrlVal(panel, imon[ch], current[ch]);
+ SetCtrlVal(panel, cvcc[ch], cv_cc);
+ if (gLogToFile){
+ if (!gFp) {
+ gFp= fopen("pw18-1.8aq.log","w");
+ fprintf(gFp,"#time\tch\tU\tI\tCV_CC\n");
+ }
+ fprintf(gFp,"%ul\t%d\t%g\t%g\t%d\n", time(NULL), ch+1, voltage, current[ch], cv_cc);
+ }
+ }
+ }
+ PlotStripChart (panel, P1_GRAPH, current, 4, 0, 0, VAL_DOUBLE);
+ break;
+ }
+ return 0;
+}
+#endif MAIN
+
Index: pw18-1.8aq/pw18-1.8aq.cws
===================================================================
--- pw18-1.8aq/pw18-1.8aq.cws (nonexistent)
+++ pw18-1.8aq/pw18-1.8aq.cws (revision 280)
@@ -0,0 +1,173 @@
+[Workspace Header]
+Version = 1302
+Pathname = "/c/home/veronika/pw18-1.8aq/pw18-1.8aq.cws"
+CVI Dir = "/c/program files/national instruments/cvi2013"
+CVI Shared Dir = "/C/Program Files/National Instruments/Shared/CVI"
+CVI Pub Local Dir = "/C/ProgramData/National Instruments/CVI2013"
+CVI Pub Global Dir = "/C/ProgramData/National Instruments/CVI"
+IVI Standard Root Dir = "/C/Program Files/IVI Foundation/IVI"
+IVI Standard Root 64-bit Dir = "/C/Program Files/IVI Foundation/IVI"
+VXIplug&play Framework Dir = "/C/Program Files/IVI Foundation/VISA/winnt"
+VXIplug&play Framework 64-bit Dir = "/C/Program Files/IVI Foundation/VISA/win64"
+Number of Projects = 1
+Active Project = 1
+Project 0001 = "pw18-1.8aq.prj"
+Drag Bar Left = 184
+Window Top = 214
+Window Left = 200
+Window Bottom = 929
+Window Right = 1708
+Maximized = False
+Maximized Children = True
+Max32 Number Of Errors = 20
+Track Include File Dependencies = True
+Prompt For Missing Includes = True
+Stop On First Error File = False
+Bring Up Err Win At Start = True
+Bring Up Err Win For Errors = False
+Save Changes Before Running = "Always"
+Save Changes Before Compiling = "Always"
+Hide Windows = False
+Break At First Statement = False
+Sort Type = "File Name"
+Number of Opened Files = 1
+Window Confinement Region Enabled = True
+MainColumnWidth = 167
+FileDateColumnWidth = 70
+FileSizeColumnWidth = 70
+
+[Project Header 0001]
+Version = 1302
+Don't Update DistKit = False
+Platform Code = 4
+Build Configuration = "Debug"
+Warn User If Debugging Release = 1
+Batch Build Release = False
+Batch Build Debug = False
+
+[File 0001]
+Path = "/c/home/veronika/pw18-1.8aq/pw18-1.8aq.c"
+File Type = "CSource"
+Disk Date = 3596084464
+In Projects = "1,"
+Window Z-Order = 1
+Source Window State = "1,0,0,0,0,0,0,0,0,161,0,0,0,0,0,36,136,0,119,45,400,600,0,0,"
+
+[File 0002]
+Path = "/c/home/veronika/pw18-1.8aq/pw18-1.8aq-ctrl.h"
+File Type = "Include"
+Disk Date = 3596084464
+In Projects = "1,"
+Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
+
+[File 0003]
+Path = "/c/home/veronika/pw18-1.8aq/pw18-1.8aq.h"
+File Type = "Include"
+Disk Date = 3596084464
+In Projects = "1,"
+Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
+
+[File 0004]
+Path = "/c/home/veronika/pw18-1.8aq/TMI_Api.h"
+File Type = "Include"
+Disk Date = 3596084464
+In Projects = "1,"
+Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
+
+[File 0005]
+Path = "/c/home/veronika/pw18-1.8aq/pw18-1.8aq-ctrl.uir"
+File Type = "User Interface Resource"
+Disk Date = 3596084464
+In Projects = "1,"
+
+[Tab Order]
+Tab 0001 = "/c/home/veronika/pw18-1.8aq/pw18-1.8aq.c"
+
+[Default Build Config 0001 Debug]
+Generate Browse Info = True
+Enable Uninitialized Locals Runtime Warning = True
+Batch Build = False
+Profile = "Disabled"
+Debugging Level = "Standard"
+Execution Trace = "Disabled"
+Command Line Args = ""
+Working Directory = ""
+Environment Options = ""
+External Process Path = ""
+
+[Default Build Config 0001 Release]
+Generate Browse Info = True
+Enable Uninitialized Locals Runtime Warning = True
+Batch Build = False
+Profile = "Disabled"
+Debugging Level = "Standard"
+Execution Trace = "Disabled"
+Command Line Args = ""
+Working Directory = ""
+Environment Options = ""
+External Process Path = ""
+
+[Default Build Config 0001 Debug64]
+Generate Browse Info = True
+Enable Uninitialized Locals Runtime Warning = True
+Batch Build = False
+Profile = "Disabled"
+Debugging Level = "Standard"
+Execution Trace = "Disabled"
+Command Line Args = ""
+Working Directory = ""
+Environment Options = ""
+External Process Path = ""
+
+[Default Build Config 0001 Release64]
+Generate Browse Info = True
+Enable Uninitialized Locals Runtime Warning = True
+Batch Build = False
+Profile = "Disabled"
+Debugging Level = "Standard"
+Execution Trace = "Disabled"
+Command Line Args = ""
+Working Directory = ""
+Environment Options = ""
+External Process Path = ""
+
+[Build Dependencies 0001]
+Number of Dependencies = 0
+
+[Build Options 0001]
+Generate Browse Info = True
+Enable Uninitialized Locals Runtime Warning = True
+Execution Trace = "Disabled"
+Profile = "Disabled"
+Debugging Level = "Standard"
+Break On Library Errors = True
+Break On First Chance Exceptions = False
+
+[Execution Target 0001]
+Execution Target Address = "Local desktop computer"
+Execution Target Port = 0
+Execution Target Type = 0
+
+[SCC Options 0001]
+Use global settings = True
+SCC Provider = ""
+SCC Project = ""
+Local Path = ""
+Auxiliary Path = ""
+Perform Same Action For .h File As For .uir File = "Ask"
+Perform Same Action For .cds File As For .prj File = "Ask"
+Username = ""
+Comment = ""
+Use Default Username = False
+Use Default Comment = False
+Suppress CVI Error Messages = False
+Always show confirmation dialog = True
+
+[DLL Debugging Support 0001]
+External Process Path = ""
+
+[Command Line Args 0001]
+Command Line Args = ""
+Working Directory = ""
+Environment Options = ""
+
Index: pw18-1.8aq/pw18-1.8aq.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/pw18-1.8aq/pw18-1.8aq.exe
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: pw18-1.8aq/pw18-1.8aq.h
===================================================================
--- pw18-1.8aq/pw18-1.8aq.h (nonexistent)
+++ pw18-1.8aq/pw18-1.8aq.h (revision 280)
@@ -0,0 +1,55 @@
+#ifndef pw18-1.8aq_h
+#define pw18-1.8aq_h
+
+HINSTANCE TMI_APIDll;
+
+int ( __stdcall* TMI_HandleOpen )( char * , char * );
+ int ( __stdcall* TMI_HandleClose )( int );
+ int ( __stdcall* TMI_TimeOut )( int , int );
+ int ( __stdcall* TMI_Refresh )( int );
+ int ( __stdcall* TMI_ModelNameQ )( int , char * );
+ int ( __stdcall* TMI_Voltage )( int , unsigned char , unsigned char , double );
+ int ( __stdcall* TMI_VoltageQ )( int , unsigned char , unsigned char , double * );
+ int ( __stdcall* TMI_Current )(int , unsigned char , unsigned char , double );
+ int ( __stdcall* TMI_CurrentQ )(int , unsigned char , unsigned char , double * );
+ int ( __stdcall* TMI_MainOutput )(int , unsigned char );
+ int ( __stdcall* TMI_MainOutputQ )(int , unsigned char * );
+ int ( __stdcall* TMI_Delay )(int , unsigned char );
+ int ( __stdcall* TMI_DelayQ )(int , unsigned char * );
+ int ( __stdcall* TMI_OutputSel )(int , unsigned char , unsigned char );
+ int ( __stdcall* TMI_OutputSelQ )(int , unsigned char , unsigned char * );
+ int ( __stdcall* TMI_TrackingOnOff )(int , unsigned char );
+ int ( __stdcall* TMI_TrackingOnOffQ )(int , unsigned char * );
+ int ( __stdcall* TMI_TrackingMode )(int , unsigned char );
+ int ( __stdcall* TMI_TrackingModeQ )(int , unsigned char * );
+ int ( __stdcall* TMI_TrackingGroup )(int , unsigned char , unsigned char );
+ int ( __stdcall* TMI_TrackingGroupQ )(int , unsigned char , unsigned char * );
+ int ( __stdcall* TMI_TrackingData )(int , unsigned char , unsigned char , double );
+ int ( __stdcall* TMI_TrackingDataQ )(int , unsigned char , unsigned char , double * );
+ int ( __stdcall* TMI_DelayTime )(int , unsigned char , double );
+ int ( __stdcall* TMI_DelayTimeQ )(int , unsigned char , double * );
+ int ( __stdcall* TMI_Display )(int , unsigned char );
+ int ( __stdcall* TMI_DisplayQ )(int , unsigned char * );
+ int ( __stdcall* TMI_Preset )(int , unsigned char );
+ int ( __stdcall* TMI_PresetQ )(int , unsigned char * );
+ int ( __stdcall* TMI_MoniDataQ )(int , char , double * , double * , char * );
+ int ( __stdcall* TMI_AdrQ )(int , unsigned char * );
+ int ( __stdcall* TMI_RemoteLocal )(int );
+ int ( __stdcall* TMI_LocalLockOut )(int );
+ int ( __stdcall* TMI_DataBackUp )(int );
+ int ( __stdcall* TMI_SRQEnable )(int , unsigned char );
+ int ( __stdcall* TMI_AllPresetQ )(int , double * );
+ int ( __stdcall* TMI_AllPresetQS )(int , char * );
+ int ( __stdcall* TMI_Out )(int , char * );
+ int ( __stdcall* TMI_In )(int , char * );
+
+
+void TMI_ReadCurrent(double * I , double * V, unsigned char * mode, unsigned char *onoff);
+int TMI_Open();
+int TMI_Close();
+int TMI_Initialize();
+int TMI_Test();
+int TMI_OpenHandle(char * dev, char * usb );
+extern int TMI_DeviceId;
+
+#endif
Index: pw18-1.8aq/pw18-1.8aq.prj
===================================================================
--- pw18-1.8aq/pw18-1.8aq.prj (nonexistent)
+++ pw18-1.8aq/pw18-1.8aq.prj (revision 280)
@@ -0,0 +1,456 @@
+[Project Header]
+Version = 1302
+Pathname = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq.prj"
+CVI Dir = "/c/program files (x86)/national instruments/cvi2013"
+CVI Shared Dir = "/C/Program Files (x86)/National Instruments/Shared/CVI"
+CVI Pub Local Dir = "/C/ProgramData/National Instruments/CVI2013"
+CVI Pub Global Dir = "/C/ProgramData/National Instruments/CVI"
+IVI Standard Root Dir = "/C/Program Files (x86)/IVI Foundation/IVI"
+VXIplug&play Framework Dir = "/C/Program Files (x86)/IVI Foundation/VISA/winnt"
+IVI Standard Root 64-bit Dir = "/C/Program Files/IVI Foundation/IVI"
+VXIplug&play Framework 64-bit Dir = "/C/Program Files/IVI Foundation/VISA/win64"
+Number of Files = 5
+Target Type = "Executable"
+Flags = 2064
+Copied From Locked InstrDrv Directory = False
+Copied from VXIPNP Directory = False
+Locked InstrDrv Name = ""
+Don't Display Deploy InstrDrv Dialog = False
+
+[Folders]
+Instrument Files Folder Not Added Yet = True
+Library Files Folder Not Added Yet = True
+Folder 0 = "Source Files"
+FolderEx 0 = "Source Files"
+Folder 1 = "Include Files"
+FolderEx 1 = "Include Files"
+Folder 2 = "User Interface Files"
+FolderEx 2 = "User Interface Files"
+
+[File 0001]
+File Type = "CSource"
+Res Id = 1
+Path Is Rel = True
+Path Rel To = "Project"
+Path Rel Path = "pw18-1.8aq.c"
+Path = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq.c"
+Exclude = False
+Compile Into Object File = False
+Project Flags = 0
+Folder = "Source Files"
+Folder Id = 0
+
+[File 0002]
+File Type = "Include"
+Res Id = 2
+Path Is Rel = True
+Path Rel To = "Project"
+Path Rel Path = "pw18-1.8aq-ctrl.h"
+Path = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq-ctrl.h"
+Exclude = False
+Project Flags = 0
+Folder = "Include Files"
+Folder Id = 1
+
+[File 0003]
+File Type = "Include"
+Res Id = 3
+Path Is Rel = True
+Path Rel To = "Project"
+Path Rel Path = "pw18-1.8aq.h"
+Path = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq.h"
+Exclude = False
+Project Flags = 0
+Folder = "Include Files"
+Folder Id = 1
+
+[File 0004]
+File Type = "Include"
+Res Id = 4
+Path Is Rel = True
+Path Rel To = "Project"
+Path Rel Path = "TMI_Api.h"
+Path = "/c/home/samo/NI/cvi/pw18-1.8aq/TMI_Api.h"
+Exclude = False
+Project Flags = 0
+Folder = "Include Files"
+Folder Id = 1
+
+[File 0005]
+File Type = "User Interface Resource"
+Res Id = 5
+Path Is Rel = True
+Path Rel To = "Project"
+Path Rel Path = "pw18-1.8aq-ctrl.uir"
+Path = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq-ctrl.uir"
+Exclude = False
+Project Flags = 0
+Folder = "User Interface Files"
+Folder Id = 2
+
+[Custom Build Configs]
+Num Custom Build Configs = 0
+
+[Default Build Config Debug]
+Config Name = "Debug"
+Is 64-Bit = False
+Is Release = False
+Default Calling Convention = "cdecl"
+Optimization Level = "Optimize for speed (level 2)"
+Require Prototypes = True
+Show Warning IDs in Build Output = False
+Selected Warning Level = "None"
+Warning List None = "4,9,84,105,106,107,108,109,110,111"
+Warning List Common = ""
+Warning List Extended = ""
+Warning List All = ""
+Warning Mode = 0
+Enable Unreferenced Identifiers Warning = False
+Enable Pointer Mismatch Warning = False
+Enable Unreachable Code Warning = False
+Enable Assignment In Conditional Warning = False
+Uninitialized Locals Compile Warning = "Aggressive"
+Require Return Values = True
+Enable C99 Extensions = False
+Enable OpenMP Extensions = False
+Stack Size = 500000
+Stack Reserve = 1048576
+Stack Commit = 4096
+Image Base Address = 4194304
+Image Base Address x64 = 4194304
+Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DMAIN"
+Sign = False
+Sign Store = ""
+Sign Certificate = ""
+Sign Timestamp URL = ""
+Sign URL = ""
+Manifest Embed = False
+Icon File Is Rel = False
+Icon File = ""
+Application Title = ""
+Use IVI Subdirectories for Import Libraries = False
+Use VXIPNP Subdirectories for Import Libraries = False
+Use Dflt Import Lib Base Name = True
+Where to Copy DLL = "Do not copy"
+Custom Directory to Copy DLL Is Rel = False
+Custom Directory to Copy DLL = ""
+Generate Source Documentation = "None"
+Runtime Support = "Full Runtime Support"
+Runtime Binding = "Shared"
+Embed Project .UIRs = False
+Generate Map File = False
+Embed Timestamp = True
+Create Console Application = False
+Using LoadExternalModule = False
+DLL Exports = "Include File Symbols"
+Register ActiveX Server = False
+Numeric File Version = "1,0,0,0"
+Numeric Prod Version = "1,0,0,0"
+Comments = ""
+Comments Ex = ""
+Company Name = ""
+Company Name Ex = "%company"
+File Description = "pw18-1.8aq (Debug x86)"
+File Description Ex = "%application (%rel_dbg %arch)"
+File Version = "1.0"
+File Version Ex = "%f1.%f2"
+Internal Name = "pw18-1.8aq"
+Internal Name Ex = "%basename"
+Legal Copyright = "Copyright © 2016"
+Legal Copyright Ex = "Copyright © %company %Y"
+Legal Trademarks = ""
+Legal Trademarks Ex = ""
+Original Filename = "pw18-1.8aq.exe"
+Original Filename Ex = "%filename"
+Private Build = ""
+Private Build Ex = ""
+Product Name = " pw18-1.8aq"
+Product Name Ex = "%company %application"
+Product Version = "1.0"
+Product Version Ex = "%p1.%p2"
+Special Build = ""
+Special Build Ex = ""
+Add Type Lib To DLL = False
+Include Type Lib Help Links = False
+TLB Help Style = "HLP"
+Type Lib FP File Is Rel = False
+Type Lib FP File = ""
+
+[Default Build Config Release]
+Config Name = "Release"
+Is 64-Bit = False
+Is Release = True
+Default Calling Convention = "cdecl"
+Optimization Level = "Optimize for speed (level 2)"
+Require Prototypes = True
+Show Warning IDs in Build Output = False
+Selected Warning Level = "None"
+Warning List None = "4,9,84,105,106,107,108,109,110,111"
+Warning List Common = ""
+Warning List Extended = ""
+Warning List All = ""
+Warning Mode = 0
+Enable Unreferenced Identifiers Warning = False
+Enable Pointer Mismatch Warning = False
+Enable Unreachable Code Warning = False
+Enable Assignment In Conditional Warning = False
+Uninitialized Locals Compile Warning = "Aggressive"
+Require Return Values = True
+Enable C99 Extensions = False
+Enable OpenMP Extensions = False
+Stack Size = 500000
+Stack Reserve = 1048576
+Stack Commit = 4096
+Image Base Address = 4194304
+Image Base Address x64 = 4194304
+Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718 /DBELLEPTS"
+Sign = False
+Sign Store = ""
+Sign Certificate = ""
+Sign Timestamp URL = ""
+Sign URL = ""
+Manifest Embed = False
+Icon File Is Rel = False
+Icon File = ""
+Application Title = ""
+Use IVI Subdirectories for Import Libraries = False
+Use VXIPNP Subdirectories for Import Libraries = False
+Use Dflt Import Lib Base Name = True
+Where to Copy DLL = "Do not copy"
+Custom Directory to Copy DLL Is Rel = False
+Custom Directory to Copy DLL = ""
+Generate Source Documentation = "None"
+Runtime Support = "Full Runtime Support"
+Runtime Binding = "Shared"
+Embed Project .UIRs = False
+Generate Map File = False
+Embed Timestamp = True
+Create Console Application = False
+Using LoadExternalModule = False
+DLL Exports = "Include File Symbols"
+Register ActiveX Server = False
+Add Type Lib To DLL = False
+Include Type Lib Help Links = False
+TLB Help Style = "HLP"
+Type Lib FP File Is Rel = False
+Type Lib FP File = ""
+
+[Default Build Config Debug64]
+Config Name = "Debug64"
+Is 64-Bit = True
+Is Release = False
+Default Calling Convention = "cdecl"
+Optimization Level = "Optimize for speed (level 2)"
+Require Prototypes = True
+Show Warning IDs in Build Output = False
+Selected Warning Level = "None"
+Warning List None = "4,9,84,105,106,107,108,109,110,111"
+Warning List Common = ""
+Warning List Extended = ""
+Warning List All = ""
+Warning Mode = 0
+Enable Unreferenced Identifiers Warning = False
+Enable Pointer Mismatch Warning = False
+Enable Unreachable Code Warning = False
+Enable Assignment In Conditional Warning = False
+Uninitialized Locals Compile Warning = "Aggressive"
+Require Return Values = True
+Enable C99 Extensions = False
+Enable OpenMP Extensions = False
+Stack Size = 500000
+Stack Reserve = 1048576
+Stack Commit = 4096
+Image Base Address = 4194304
+Image Base Address x64 = 4194304
+Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718 /DBELLEPTS"
+Sign = False
+Sign Store = ""
+Sign Certificate = ""
+Sign Timestamp URL = ""
+Sign URL = ""
+Manifest Embed = False
+Icon File Is Rel = False
+Icon File = ""
+Application Title = ""
+Use IVI Subdirectories for Import Libraries = False
+Use VXIPNP Subdirectories for Import Libraries = False
+Use Dflt Import Lib Base Name = True
+Where to Copy DLL = "Do not copy"
+Custom Directory to Copy DLL Is Rel = False
+Custom Directory to Copy DLL = ""
+Generate Source Documentation = "None"
+Runtime Support = "Full Runtime Support"
+Runtime Binding = "Shared"
+Embed Project .UIRs = False
+Generate Map File = False
+Embed Timestamp = True
+Create Console Application = False
+Using LoadExternalModule = False
+DLL Exports = "Include File Symbols"
+Register ActiveX Server = False
+Add Type Lib To DLL = False
+Include Type Lib Help Links = False
+TLB Help Style = "HLP"
+Type Lib FP File Is Rel = False
+Type Lib FP File = ""
+
+[Default Build Config Release64]
+Config Name = "Release64"
+Is 64-Bit = True
+Is Release = True
+Default Calling Convention = "cdecl"
+Optimization Level = "Optimize for speed (level 2)"
+Require Prototypes = True
+Show Warning IDs in Build Output = False
+Selected Warning Level = "None"
+Warning List None = "4,9,84,105,106,107,108,109,110,111"
+Warning List Common = ""
+Warning List Extended = ""
+Warning List All = ""
+Warning Mode = 0
+Enable Unreferenced Identifiers Warning = False
+Enable Pointer Mismatch Warning = False
+Enable Unreachable Code Warning = False
+Enable Assignment In Conditional Warning = False
+Uninitialized Locals Compile Warning = "Aggressive"
+Require Return Values = True
+Enable C99 Extensions = False
+Enable OpenMP Extensions = False
+Stack Size = 500000
+Stack Reserve = 1048576
+Stack Commit = 4096
+Image Base Address = 4194304
+Image Base Address x64 = 4194304
+Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718 /DBELLEPTS"
+Sign = False
+Sign Store = ""
+Sign Certificate = ""
+Sign Timestamp URL = ""
+Sign URL = ""
+Manifest Embed = False
+Icon File Is Rel = False
+Icon File = ""
+Application Title = ""
+Use IVI Subdirectories for Import Libraries = False
+Use VXIPNP Subdirectories for Import Libraries = False
+Use Dflt Import Lib Base Name = True
+Where to Copy DLL = "Do not copy"
+Custom Directory to Copy DLL Is Rel = False
+Custom Directory to Copy DLL = ""
+Generate Source Documentation = "None"
+Runtime Support = "Full Runtime Support"
+Runtime Binding = "Shared"
+Embed Project .UIRs = False
+Generate Map File = False
+Embed Timestamp = True
+Create Console Application = False
+Using LoadExternalModule = False
+DLL Exports = "Include File Symbols"
+Register ActiveX Server = False
+Add Type Lib To DLL = False
+Include Type Lib Help Links = False
+TLB Help Style = "HLP"
+Type Lib FP File Is Rel = False
+Type Lib FP File = ""
+
+[Compiler Options]
+Default Calling Convention = "cdecl"
+Require Prototypes = True
+Require Return Values = True
+Enable Pointer Mismatch Warning = False
+Enable Unreachable Code Warning = False
+Enable Unreferenced Identifiers Warning = False
+Enable Assignment In Conditional Warning = False
+O Option Compatible With 5.0 = False
+Enable C99 Extensions = False
+Uninitialized Locals Compile Warning = "Aggressive"
+Precompile Prefix Header = False
+Prefix Header File = ""
+
+[Run Options]
+Stack Size = 500000
+Stack Commit = 4096
+Image Base Address = 4194304
+Image Base Address x64 = 4194304
+
+[Compiler Defines]
+Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718 /DBELLEPTS"
+
+[Create Executable]
+Executable File_Debug Is Rel = True
+Executable File_Debug Rel To = "Project"
+Executable File_Debug Rel Path = "pw18-1.8aq.exe"
+Executable File_Debug = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq.exe"
+Executable File_Release Is Rel = True
+Executable File_Release Rel To = "Project"
+Executable File_Release Rel Path = "pw18-1.8aq.exe"
+Executable File_Release = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq.exe"
+Executable File_Debug64 Is Rel = True
+Executable File_Debug64 Rel To = "Project"
+Executable File_Debug64 Rel Path = "pw18-1.8aq.exe"
+Executable File_Debug64 = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq.exe"
+Executable File_Release64 Is Rel = True
+Executable File_Release64 Rel To = "Project"
+Executable File_Release64 Rel Path = "pw18-1.8aq.exe"
+Executable File_Release64 = "/c/home/samo/NI/cvi/pw18-1.8aq/pw18-1.8aq.exe"
+Icon File Is Rel = False
+Icon File = ""
+Application Title = ""
+DLL Exports = "Include File Symbols"
+Use IVI Subdirectories for Import Libraries = False
+Use VXIPNP Subdirectories for Import Libraries = False
+Use Dflt Import Lib Base Name = True
+Where to Copy DLL = "Do not copy"
+Custom Directory to Copy DLL Is Rel = False
+Custom Directory to Copy DLL = ""
+Generate Source Documentation = "None"
+Add Type Lib To DLL = False
+Include Type Lib Help Links = False
+TLB Help Style = "HLP"
+Type Lib FP File Is Rel = False
+Type Lib FP File = ""
+Type Lib Guid = ""
+Runtime Support = "Full Runtime Support"
+Instrument Driver Support Only = False
+Embed Project .UIRs = False
+Generate Map File = False
+
+[External Compiler Support]
+UIR Callbacks File Option = 0
+Using LoadExternalModule = False
+Create Project Symbols File = True
+UIR Callbacks Obj File Is Rel = False
+UIR Callbacks Obj File = ""
+Project Symbols H File Is Rel = False
+Project Symbols H File = ""
+Project Symbols Obj File Is Rel = False
+Project Symbols Obj File = ""
+
+[ActiveX Server Options]
+Specification File Is Rel = False
+Specification File = ""
+Source File Is Rel = False
+Source File = ""
+Include File Is Rel = False
+Include File = ""
+IDL File Is Rel = False
+IDL File = ""
+Register ActiveX Server = False
+
+[Signing Info]
+Sign = False
+Sign Debug Build = False
+Store = ""
+Certificate = ""
+Timestamp URL = ""
+URL = ""
+
+[Manifest Info]
+Embed = False
+
+[tpcSection]
+tpcEnabled = 0
+tpcOverrideEnvironment = 0
+tpcEnabled x64 = 0
+tpcOverrideEnvironment x64 = 0
+