aggiunta note decodifica modi siemens/torri + decodifica in sw x modo corrente

This commit is contained in:
Samuele E. Locatelli
2018-07-25 17:37:54 +02:00
parent 277b6cd5c4
commit 803c7829cc
3 changed files with 74 additions and 10 deletions
+9
View File
@@ -23,6 +23,15 @@
018|AUTO_POWER_OFF |BYTE
019|OVR_FEED |BYTE
020|OVR_SPEED |BYTE
# CURR MODE diviso in BIT:
# B0 (01) = AUTO
# B1 (02) = MDI
# B2 (04) = JOG
# B3 (08) = TeachIN (associato a MDI --> 10)
# B4 (16) = Repos (associato a JOG --> 20)
# B5 (32) = RefPoint (associato a Jog --> 36)
# B6 (64) = Incr1 (associato a Jog --> 68)
# B7 (128) = Incr10 (associato a Jog --> -124 / 132 se UInt)
021|CURR_MODE |BYTE
# valori word come UINT 16bit/Word 32bit/DWord
022|COUNT_TOT |WORD
+64 -9
View File
@@ -516,6 +516,7 @@ namespace IOB_WIN
// !!!FARE!!! recuperare da conf memoria, ora HARD CODED
outVal.Add("FEED_OVER", RawInput[19].ToString());
outVal.Add("RAPID_OVER", RawInput[20].ToString());
outVal.Add("CURR_MODE", decodeCurrMode(RawInput[21]));
return outVal;
}
@@ -536,20 +537,74 @@ namespace IOB_WIN
decodeToBaseBitmap();
decodeOtherData();
}
/// <summary>
/// decodifica da bitmap il CURRENT MODE del controllo
/// </summary>
/// <param name="currModeBitmap"></param>
/// <returns></returns>
protected string decodeCurrMode(byte currModeBitmap)
{
string answ = "";
if (verboseLog) lgInfo(string.Format("CURR_MODE raw data: {0}", utils.binaryForm((int)currModeBitmap)));
// decodifica del MODO... B21
/*
* CURR MODE diviso in BIT:
* B0 (01) = AUTO
* B1 (02) = MDI
* B2 (04) = JOG
* B3 (08) = TeachIN (associato a MDI --> 10)
* B4 (16) = Repos (associato a JOG --> 20)
* B5 (32) = RefPoint (associato a Jog --> 36)
* B6 (64) = Incr1 (associato a Jog --> 68)
* B7 (128) = Incr10 (associato a Jog --> -124 / 132 se UInt)
* */
// modi principali
if (currModeBitmap.SelectBit(0))
{
answ = "AUTO";
}
else if (currModeBitmap.SelectBit(1))
{
answ = "MDI";
}
else if (currModeBitmap.SelectBit(2))
{
answ = "JOG";
}
// modi accessori
if (currModeBitmap.SelectBit(3))
{
answ += " | TEACH-IN";
}
if (currModeBitmap.SelectBit(4))
{
answ += " | REPOS";
}
if (currModeBitmap.SelectBit(5))
{
answ += " | REF-POINT";
}
if (currModeBitmap.SelectBit(6))
{
answ += " | INCR-1";
}
if (currModeBitmap.SelectBit(7))
{
answ += " | INCR-10";
}
return answ;
}
/// <summary>
/// Decodifica il resto dell'area TORRI x i dati accessori (allarmi, ...)
/// </summary>
private void decodeOtherData()
{
//if (verboseLog)
//{
// int i = 0;
// foreach (var item in RawInput)
// {
// lgInfo(string.Format("Byte[{0:00}]: {1}", i, utils.binaryForm((int)item)));
// i++;
// }
//}
if (verboseLog)
{
}
}
/// <summary>
Vendored
+1 -1
View File
@@ -14,7 +14,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=278']) {
withEnv(['NEXT_BUILD_NUMBER=280']) {
// env.versionNumber = VersionNumber(versionNumberString : '1.18.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '1.18.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO-IOB-WIN'