Mitsubishi:
- aggiunto flusso init - continuo sviluppo adapter
This commit is contained in:
@@ -362,6 +362,11 @@ namespace IOB_UT_NEXT
|
||||
/// </summary>
|
||||
ND,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter MITSUBISHI con EZCnc lib
|
||||
/// </summary>
|
||||
MITSUBISHI,
|
||||
|
||||
/// <summary>
|
||||
/// Adapter ModBus TCP generico
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using IOB_UT_NEXT;
|
||||
using IOB_WIN_NEXT.Iob;
|
||||
using IOB_WIN_NEXT.IobSoap;
|
||||
using MapoSDK;
|
||||
using Newtonsoft.Json;
|
||||
@@ -1690,6 +1691,11 @@ namespace IOB_WIN_NEXT
|
||||
start.Enabled = true;
|
||||
break;
|
||||
|
||||
case tipoAdapter.MITSUBISHI:
|
||||
iobObj = new Mitsubishi(this, IOBConf);
|
||||
start.Enabled = true;
|
||||
break;
|
||||
|
||||
case tipoAdapter.MODBUS_TCP:
|
||||
iobObj = new IobModbusTCP.ModbusTCP(this, IOBConf);
|
||||
start.Enabled = true;
|
||||
|
||||
@@ -52,6 +52,7 @@ BLINK_FILT=0
|
||||
|
||||
[OPTPAR]
|
||||
EZNC_SYS=EZNC_SYS_MELDAS700L
|
||||
ENABLE_PZCOUNT=TRUE
|
||||
;PZCOUNT_MODE=STD|BIT
|
||||
;PZCOUNT_MODE=STD.PAR.6711
|
||||
;PZGTOT_MODE=STD.PAR.6712
|
||||
@@ -67,8 +68,8 @@ ENABLE_SEND_PZC_BLOCK=TRUE
|
||||
MIN_SEND_PZC_BLOCK=0
|
||||
MAX_SEND_PZC_BLOCK=100
|
||||
; conf cablata set Art/Commessa
|
||||
SET_NUM_ART=STD.VAR.501
|
||||
SET_NUM_COM=STD.VAR.500
|
||||
SET_NUM_ART=STD.VAR.501
|
||||
SET_NUM_PZ=STD.VAR.502
|
||||
MAX_CHAR_DESC=7
|
||||
;indica se il numero articolo sia semplicemente il trim dei caratteri alfabetici (chiama comunque server...)
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace IOB_WIN_NEXT.Iob
|
||||
/// <param name="adpConf"></param>
|
||||
public Fanuc(AdapterForm caller, IobConfiguration IOBConf) : base(caller, IOBConf)
|
||||
{
|
||||
lgInfo("Start init Fanuc");
|
||||
// i dati RAW principali sono 6 byte...
|
||||
RawInput = new byte[6];
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -38,11 +38,11 @@ namespace Mitsubishi
|
||||
|
||||
// [Local variable declaration]
|
||||
object BlockValue = "";
|
||||
int Ret = 0;
|
||||
int iRet = 0;
|
||||
//Open communication
|
||||
Ret = oEZNcAutCom.SetTCPIPProtocol("192.168.213.199", 683);
|
||||
//Console.WriteLine($"R: {Ret}");
|
||||
Ret = oEZNcAutCom.Open3(5, 1, 10, "EZNC_LOCALHOST");
|
||||
iRet = oEZNcAutCom.SetTCPIPProtocol("192.168.213.199", 683);
|
||||
//Console.WriteLine($"R: {iRet}");
|
||||
iRet = oEZNcAutCom.Open3(5, 1, 10, "EZNC_LOCALHOST");
|
||||
|
||||
DoLog(sep);
|
||||
DoLog("Retrieve Serial/Vers");
|
||||
@@ -90,6 +90,12 @@ namespace Mitsubishi
|
||||
// preparo memorie
|
||||
string prgText = "";
|
||||
int prgState = 0;
|
||||
// solo nome...
|
||||
iRet = oEZNcAutCom.Program_GetProgramNumber2((Int32)PROGRAMTYPE.EZNC_MAINPRG, out String strProgramNo);
|
||||
DoLog($"ProgramName: {strProgramNo}");
|
||||
DoLog("");
|
||||
|
||||
// leggo contenuto
|
||||
try
|
||||
{
|
||||
oEZNcAutCom.Program_CurrentBlockRead(10, out prgText, out prgState);
|
||||
@@ -125,7 +131,7 @@ namespace Mitsubishi
|
||||
double pdPosit = 0;
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
Ret = oEZNcAutCom.Position_GetCurrentPosition(i, out pdPosit);
|
||||
iRet = oEZNcAutCom.Position_GetCurrentPosition(i, out pdPosit);
|
||||
DoLog($"Pos: {i} | {pdPosit}");
|
||||
}
|
||||
DoLog(sep);
|
||||
@@ -287,7 +293,7 @@ namespace Mitsubishi
|
||||
DoLog("");
|
||||
|
||||
// Close.
|
||||
Ret = oEZNcAutCom.Close();
|
||||
iRet = oEZNcAutCom.Close();
|
||||
//Release object
|
||||
oEZNcAutCom = null;
|
||||
|
||||
@@ -302,6 +308,12 @@ namespace Mitsubishi
|
||||
Console.WriteLine(logMessage);
|
||||
}
|
||||
|
||||
public enum PROGRAMTYPE
|
||||
{
|
||||
EZNC_MAINPRG = 0, //メインプログラム
|
||||
EZNC_SUBPRG = 1, //サブプログラム
|
||||
}
|
||||
|
||||
protected static string outPath = "";
|
||||
|
||||
private static string sep = "------------------------";
|
||||
|
||||
Reference in New Issue
Block a user