versienr
This commit is contained in:
parent
f5c2e4bc7f
commit
02c8e19aa0
8 changed files with 106 additions and 79 deletions
|
|
@ -378,14 +378,17 @@ void Epd3Base::Epd3U::DecodeStatus()
|
||||||
eDosBatteryWarning = OtherAlarmBatLow | OtherAlarmBatVolt;
|
eDosBatteryWarning = OtherAlarmBatLow | OtherAlarmBatVolt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Epd3Base::Epd3U::SetTime() //Only R3
|
int Epd3Base::Epd3U::SetTime() //Only R3
|
||||||
{
|
{
|
||||||
if (Epd.Gen == EpdGeneration::Mk3) {
|
int r = 0;
|
||||||
|
if (Epd.Gen == EpdGeneration::Mk3)
|
||||||
|
{
|
||||||
utc = TimeFunctions::NowToEpdTime(Epd.Gen == EpdGeneration::Mk2);
|
utc = TimeFunctions::NowToEpdTime(Epd.Gen == EpdGeneration::Mk2);
|
||||||
token = BeginWriteRTC_R3(epdComsHandle, utc, nullptr);
|
token = BeginWriteRTC_R3(epdComsHandle, utc, nullptr);
|
||||||
uint32_t r = Commit3(epdComsHandle);
|
r = Commit3(epdComsHandle);
|
||||||
if (!r) Dll3RV = EndWriteRTC_R3(epdComsHandle, token);
|
if (!r) r = EndWriteRTC_R3(epdComsHandle, token);
|
||||||
}
|
}
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
|
@ -977,14 +980,20 @@ WORD Epd3Base::Epd3U::PrepareForIssue()
|
||||||
if (port == 0) return 0;
|
if (port == 0) return 0;
|
||||||
|
|
||||||
step = 1;
|
step = 1;
|
||||||
if (DetectorsOn) {
|
/*if (DetectorsOn) {
|
||||||
token = BeginEpdOnOff(epdComsHandle, 0, nullptr);
|
token = BeginEpdOnOff(epdComsHandle, 0, nullptr);
|
||||||
rv = Commit3(epdComsHandle);
|
rv = Commit3(epdComsHandle);
|
||||||
if (!rv) rv = EndEpdOnOff(epdComsHandle, token);
|
if (!rv) rv = EndEpdOnOff(epdComsHandle, token);
|
||||||
rv = ReOpenDev();
|
rv = ReOpenDev();
|
||||||
}
|
}
|
||||||
if (rv != 0)
|
if (rv != 0)
|
||||||
goto error;
|
goto error;*/
|
||||||
|
|
||||||
|
token = BeginEpdOnOff(epdComsHandle, 1, nullptr);
|
||||||
|
rv = Commit3(epdComsHandle);
|
||||||
|
if (!rv) rv = EndEpdOnOff(epdComsHandle, token);
|
||||||
|
if (rv != 0)
|
||||||
|
rv = 0;
|
||||||
|
|
||||||
step = 2;
|
step = 2;
|
||||||
if (WriteConfig32) {
|
if (WriteConfig32) {
|
||||||
|
|
@ -994,7 +1003,8 @@ WORD Epd3Base::Epd3U::PrepareForIssue()
|
||||||
}
|
}
|
||||||
|
|
||||||
step = 3;
|
step = 3;
|
||||||
rv = ReOpenDev();
|
if (!isConnected)
|
||||||
|
rv = ReOpenDev();
|
||||||
|
|
||||||
step = 4;
|
step = 4;
|
||||||
rv = ClearDoses();
|
rv = ClearDoses();
|
||||||
|
|
@ -1005,7 +1015,7 @@ WORD Epd3Base::Epd3U::PrepareForIssue()
|
||||||
rv = ClearAlarms();
|
rv = ClearAlarms();
|
||||||
if (rv != 0)
|
if (rv != 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
Sleep(2000);
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
|
|
@ -1184,7 +1194,7 @@ error:
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>0 Success</returns>
|
/// <returns>0 Success</returns>
|
||||||
|
|
||||||
WORD Epd3Base::Epd3U::Issue(bool PrepareDone)
|
WORD Epd3Base::Epd3U::Issue(bool PrepareDone) //normaal is preparedone=tru
|
||||||
{
|
{
|
||||||
int r = 0;
|
int r = 0;
|
||||||
int step = 0;
|
int step = 0;
|
||||||
|
|
@ -1347,7 +1357,7 @@ int Epd3Base::Epd3U::GetAllDeissue(bool reconnect)
|
||||||
{
|
{
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
int step = 0;
|
int step = 0;
|
||||||
|
//reconnect ??
|
||||||
step = 1;
|
step = 1;
|
||||||
rv = ReadDoses(); //0 = success
|
rv = ReadDoses(); //0 = success
|
||||||
if (rv) goto error;
|
if (rv) goto error;
|
||||||
|
|
@ -1368,6 +1378,7 @@ error:
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// main issue routine
|
||||||
int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate)
|
int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate)
|
||||||
{
|
{
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
@ -1376,6 +1387,16 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate)
|
||||||
if (!isConnected) rv = ReOpenDev();
|
if (!isConnected) rv = ReOpenDev();
|
||||||
if (rv) goto error;
|
if (rv) goto error;
|
||||||
|
|
||||||
|
step = 1;
|
||||||
|
rv = SetTime();
|
||||||
|
//synctime
|
||||||
|
|
||||||
|
step = 2;
|
||||||
|
rv = PrepareForIssue(); //Set epd on, clear doses and alarms
|
||||||
|
if (rv) goto error;
|
||||||
|
|
||||||
|
|
||||||
|
step = 3;
|
||||||
if (isNG) {
|
if (isNG) {
|
||||||
step = 1;
|
step = 1;
|
||||||
float kx = gain;
|
float kx = gain;
|
||||||
|
|
@ -1389,13 +1410,12 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate)
|
||||||
if (rv != 0) goto error;
|
if (rv != 0) goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
step = 3;
|
step = 3;
|
||||||
rv = SetChirp(ChirpRate);
|
rv = SetChirp(ChirpRate);
|
||||||
if (rv) goto error;
|
if (rv) goto error;
|
||||||
|
Sleep(1000);
|
||||||
step = 4;
|
|
||||||
rv = PrepareForIssue();
|
|
||||||
if (rv) goto error;
|
|
||||||
|
|
||||||
step = 5;
|
step = 5;
|
||||||
rv = Issue(true); // data already loaded
|
rv = Issue(true); // data already loaded
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ namespace Epd3Base {
|
||||||
|
|
||||||
void CloseDev(bool CloseAll);
|
void CloseDev(bool CloseAll);
|
||||||
void DecodeStatus();
|
void DecodeStatus();
|
||||||
void SetTime();
|
int SetTime();
|
||||||
|
|
||||||
int ReadStatus();
|
int ReadStatus();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -344,49 +344,55 @@ int EpdBaseClr::Epd2::ClearAlarms()
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>0 OK</returns>
|
/// <returns>0 OK</returns>
|
||||||
int EpdBaseClr::Epd2::SetDeIssued()
|
//int EpdBaseClr::Epd2::SetDeIssued()
|
||||||
{
|
//{
|
||||||
int rv = 0;
|
// int rv = 0;
|
||||||
ErrorStep = 0; ErrorRV = 0;
|
// ErrorStep = 0; ErrorRV = 0;
|
||||||
if (isMK3) {
|
// if (isMK3) {
|
||||||
rv = epd3->DeIssue();
|
// rv = epd3->DeIssue();
|
||||||
ErrorStep = epd3->ErrorStep;
|
// ErrorStep = epd3->ErrorStep;
|
||||||
ErrorRV = epd3->Error;
|
// ErrorRV = epd3->Error;
|
||||||
}
|
// }
|
||||||
else rv = epd->DeIssue();
|
// else rv = epd->DeIssue();
|
||||||
return rv;
|
// return rv;
|
||||||
}
|
//}
|
||||||
|
|
||||||
int EpdBaseClr::Epd2::PrepareForIssue()
|
//int EpdBaseClr::Epd2::PrepareForIssue()
|
||||||
{
|
//{
|
||||||
int rv = 0;
|
// int rv = 0;
|
||||||
PrepareForIssueError = 0;
|
// PrepareForIssueError = 0;
|
||||||
ErrorStep = 0; ErrorRV = 0;
|
// ErrorStep = 0; ErrorRV = 0;
|
||||||
if (isMK3) {
|
// if (isMK3) {
|
||||||
rv = epd3->PrepareForIssue();
|
// rv = epd3->PrepareForIssue();
|
||||||
ErrorStep = epd3->ErrorStep;
|
// ErrorStep = epd3->ErrorStep;
|
||||||
ErrorRV = epd3->Error;
|
// ErrorRV = epd3->Error;
|
||||||
}
|
// }
|
||||||
else rv= epd->PrepareForIssue();
|
// else rv= epd->PrepareForIssue();
|
||||||
if (rv != 0) PrepareForIssueError = epd->Error;
|
// if (rv != 0) PrepareForIssueError = epd->Error;
|
||||||
return rv;
|
// return rv;
|
||||||
}
|
//}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// should not be used
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>0 OK</returns>
|
/// <returns>0 OK</returns>
|
||||||
int EpdBaseClr::Epd2::SetIssued()
|
//int EpdBaseClr::Epd2::SetIssued()
|
||||||
{
|
//{
|
||||||
int rv = 0;
|
// int rv = 0;
|
||||||
ErrorStep = 0; ErrorRV = 0;
|
// ErrorStep = 0; ErrorRV = 0;
|
||||||
if (isMK3) {
|
// if (isMK3) {
|
||||||
rv=SetIssued(epd3);
|
// rv=SetIssued(epd3);
|
||||||
ErrorStep = epd3->ErrorStep;
|
// ErrorStep = epd3->ErrorStep;
|
||||||
ErrorRV = epd3->Error;
|
// ErrorRV = epd3->Error;
|
||||||
}
|
// }
|
||||||
else rv=SetIssued(epd);
|
// else rv=SetIssued(epd);
|
||||||
return rv;
|
// return rv;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// BeforeSetIssued : geen interactie met epd, maar zet varibaleln
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="epd"></param>
|
||||||
|
/// <returns></returns>
|
||||||
int EpdBaseClr::Epd2::BeforeSetIssued(Epd3Base::Epd3U* epd)
|
int EpdBaseClr::Epd2::BeforeSetIssued(Epd3Base::Epd3U* epd)
|
||||||
{
|
{
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
@ -423,14 +429,14 @@ int EpdBaseClr::Epd2::BeforeSetIssued(Epd3Base::Epd3U* epd)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="epd"></param>
|
/// <param name="epd"></param>
|
||||||
/// <returns>0 success</returns>
|
/// <returns>0 success</returns>
|
||||||
int EpdBaseClr::Epd2::SetIssued(Epd3Base::Epd3U* epd)
|
//int EpdBaseClr::Epd2::SetIssued(Epd3Base::Epd3U* epd)
|
||||||
{
|
//{
|
||||||
int rv = 0;
|
// int rv = 0;
|
||||||
rv = BeforeSetIssued(epd);
|
// rv = BeforeSetIssued(epd);
|
||||||
rv = epd->Issue(false);
|
// rv = epd->Issue(false);
|
||||||
if (rv != 0) SetIssuedError = epd->Error;
|
// if (rv != 0) SetIssuedError = epd->Error;
|
||||||
return rv;
|
// return rv;
|
||||||
}
|
//}
|
||||||
int EpdBaseClr::Epd2::BeforeSetIssued(EpdBase::Epd2U* epd)
|
int EpdBaseClr::Epd2::BeforeSetIssued(EpdBase::Epd2U* epd)
|
||||||
{
|
{
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
@ -464,14 +470,14 @@ int EpdBaseClr::Epd2::BeforeSetIssued(EpdBase::Epd2U* epd)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int EpdBaseClr::Epd2::SetIssued(EpdBase::Epd2U* epd)
|
//int EpdBaseClr::Epd2::SetIssued(EpdBase::Epd2U* epd)
|
||||||
{
|
//{
|
||||||
int rv = 0;
|
// int rv = 0;
|
||||||
BeforeSetIssued(epd);
|
// BeforeSetIssued(epd);
|
||||||
rv = epd->Issue();
|
// rv = epd->Issue();
|
||||||
if (rv != 0) SetIssuedError = epd->Error;
|
// if (rv != 0) SetIssuedError = epd->Error;
|
||||||
return rv;
|
// return rv;
|
||||||
}
|
//}
|
||||||
int EpdBaseClr::Epd2::WriteCalibration()
|
int EpdBaseClr::Epd2::WriteCalibration()
|
||||||
{
|
{
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
|
||||||
|
|
@ -287,11 +287,11 @@ namespace EpdBaseClr {
|
||||||
int AfterGetDoses(Epd3Base::Epd3U* epd);
|
int AfterGetDoses(Epd3Base::Epd3U* epd);
|
||||||
int GetDoses(Epd3Base::Epd3U* epd);
|
int GetDoses(Epd3Base::Epd3U* epd);
|
||||||
int ClearAlarms();
|
int ClearAlarms();
|
||||||
int SetIssued();
|
//int SetIssued();
|
||||||
int BeforeSetIssued(Epd3Base::Epd3U* epd);
|
int BeforeSetIssued(Epd3Base::Epd3U* epd);
|
||||||
int SetIssued(Epd3Base::Epd3U* epd);
|
//int SetIssued(Epd3Base::Epd3U* epd);
|
||||||
int BeforeSetIssued(EpdBase::Epd2U* epd);
|
int BeforeSetIssued(EpdBase::Epd2U* epd);
|
||||||
int SetIssued(EpdBase::Epd2U* epd);
|
//int SetIssued(EpdBase::Epd2U* epd);
|
||||||
|
|
||||||
int WriteCalibration();
|
int WriteCalibration();
|
||||||
int WriteCalibration(EpdBase::Epd2U* epd);
|
int WriteCalibration(EpdBase::Epd2U* epd);
|
||||||
|
|
@ -310,7 +310,7 @@ namespace EpdBaseClr {
|
||||||
int tokenSourceTimeout;
|
int tokenSourceTimeout;
|
||||||
int readRetries;
|
int readRetries;
|
||||||
System::Threading::Tasks::Task^ waitTask;
|
System::Threading::Tasks::Task^ waitTask;
|
||||||
int SetDeIssued();
|
//int SetDeIssued();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -330,6 +330,6 @@ namespace EpdBaseClr {
|
||||||
|
|
||||||
void WaitEpd();
|
void WaitEpd();
|
||||||
|
|
||||||
int PrepareForIssue();
|
//int PrepareForIssue();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<userSettings>
|
<userSettings>
|
||||||
<eDosStation.Properties.Settings>
|
<eDosStation.Properties.Settings>
|
||||||
<setting name="ComPort" serializeAs="String">
|
<setting name="ComPort" serializeAs="String">
|
||||||
<value>7</value>
|
<value>3</value>
|
||||||
</setting>
|
</setting>
|
||||||
</eDosStation.Properties.Settings>
|
</eDosStation.Properties.Settings>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ using System.Windows;
|
||||||
|
|
||||||
//2.16 : version with reconnect MK3v2)
|
//2.16 : version with reconnect MK3v2)
|
||||||
//2.18 : more tested
|
//2.18 : more tested
|
||||||
|
//2.20 Thermo : workflow bij issue ( en toevoegen time set)
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.19.0.0")]
|
[assembly: AssemblyVersion("2.20.0.0")]
|
||||||
[assembly: AssemblyFileVersion("2.19.0.0")]
|
[assembly: AssemblyFileVersion("2.20.0.0")]
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Thu 05/30/2024 16:10:43.91
|
Wed 08/28/2024 12:26:57.52
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Reference in a new issue