Files
cms-core-active/CMS_CORE_Library/Nc.cs
T
Lucio Maranta d4df4bc5b8 Fix osai null reference
Fix demo tool table config
Added part program message
2019-05-06 15:15:18 +00:00

1939 lines
84 KiB
C#

using CMS_CORE_Library.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using static CMS_CORE_Library.Models.DataStructures;
namespace CMS_CORE_Library
{
public abstract partial class Nc
{
//Private Global Variables
internal bool Connected;
internal string Ip;
internal ushort Port;
internal bool UseProxy;
internal string LibName = "CMS_CORE_Library.dll";
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region LIB Methods
/**
* <summary>
* Get the NC IP-Address
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* */
public string LIB_GetIpAddress()
{
return Ip;
}
/**
* <summary>
* Set the NC IP-Address
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* */
public void LIB_SetIpAddress(string ip)
{
Ip = ip;
}
/**
* <summary>
* Get Nc Port
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* */
public ushort LIB_GetPort()
{
return Port;
}
/**
* <summary>
* Set Nc Port
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* */
public void LIB_SetPort(ushort port)
{
Port = port;
}
/**
* <summary>
* Get Library Version
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* */
public string LIB_GetLibraryVersion()
{
return FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion.ToString();
}
#endregion LIB Methods
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region NC High-level data (to override)
/**
* <summary>
* Connect the NC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* </summary>
* */
public abstract CmsError NC_Connect();
/**
* <summary>
* Disconnect the NC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* </summary>
* */
public abstract CmsError NC_Disconnect();
/**
* <summary>
* Read Nc Status
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* */
public bool NC_IsConnected()
{
return Connected;
}
/**
* <summary>
* Read actual time of the NC-Software (sometimes it can be different from NC-Operative-System)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ActualTime">Reference of a DateTime Variable where data will be saved</param>
* */
public abstract CmsError NC_RDateTime(ref DateTime ActualTime);
/**
* <summary>
* Read Vendor NC Serial number
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="SN">Reference of a String Variable where data will be saved</param>
* */
public abstract CmsError NC_RSerialNumber(ref string SN);
/**
* <summary>
* Read Model name of the NC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ModelName">Reference of a String Variable where data will be saved</param>
* */
public abstract CmsError NC_RModelName(ref string ModelName);
/**
* <summary>
* Read Software Version of the Nc
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="SWV">Reference of a String Variable where data will be saved</param>
* */
public abstract CmsError NC_RSoftwareVersion(ref string SWV);
/**
* <summary>
* Read CMS Serial number of the Machine
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="MachNumber">Reference of a String Variable where data will be saved</param>
* */
public abstract CmsError NC_RMachineNumber(ref string MachNumber);
/**
* <summary>
* Read number of configured Processes/Paths
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Reference of a ushort Variable where data will be saved</param>
* */
public abstract CmsError NC_RProcessesNum(ref ushort ProcNumber);
/**
* <summary>
* Read the configured language of the NC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Language">Reference of a CultureInfo Variable where data will be saved</param>
* */
public abstract CmsError NC_RLanguage(ref CultureInfo Language);
/**
* <summary>
* Write the configured language of the NC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Language">CultureInfo Variable with the new Language</param>
* */
public abstract CmsError NC_WLanguage(CultureInfo Language);
/**
* <summary>
* Read active alarms of the NC (Nc-Process indipendent). For OSAI Nc the list can contain only one Message
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process to execute the action</param>
* <param name="alarms">Reference of a List of String Variables where data will be saved</param>
* */
public abstract CmsError NC_RActiveAlarms(ref List<AlarmModel> alarms);
/**
* <summary>
* Check if the NC is in running state
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="running">Reference to boolean where running state will be saved</param>
* */
public abstract CmsError NC_RIsRunning(ref bool running);
public abstract CmsError NC_GetTranslatedPlcMessages(string language, ref Dictionary<int, string> messages);
/**
* <summary>
* Set the screen page visible of the NC
* <para>
* Compatibility: Fanuc | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="screen">change the screen view in HMI application</param>
* */
public abstract CmsError NC_SetScreenVisible(SCREEN_PAGE screen);
// Get NC unit of measure
public abstract CmsError NC_RUnitOfMeasure(ref string unitOfMeasure);
#endregion NC High-level data (to override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region NC Low-level data (to override)
/**
* <summary>Read Boolean Parameter Machine (Not compatible for Axis Parameter (Multiple values in a parameter)
* <para>
* Compatibility: Fanuc
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Index">Index of the parameter</param>
* <param name="Bit">Set the Bit to Read. (0..7)</param>
* <param name="Value">Reference of a variable with Param values</param>
* */
public abstract CmsError NC_RParam(short Index, short Bit, ref bool Value);
/**
* <summary>Read Byte Parameter Machine (Not compatible for Axis Parameter (Multiple values in a parameter)
* <para>
* Compatibility: Fanuc
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Index">Index of the parameter</param>
* <param name="Value">Reference of a variable with Param values</param>
* */
public abstract CmsError NC_RParam(short Index, ref byte Value);
/**
* <summary>Read 2 Byte (Short) Parameter Machine (Not compatible for Axis Parameter (Multiple values in a parameter)
* <para>
* Compatibility: Fanuc
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Index">Index of the parameter</param>
* <param name="Value">Reference of a variable with Param values</param>
* */
public abstract CmsError NC_RParam(short Index, ref short Value);
/**
* <summary>Read 4 Byte (Integer) Parameter Machine (Not compatible for Axis Parameter (Multiple values in a parameter)
* <para>
* Compatibility: Fanuc
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Index">Index of the parameter</param>
* <param name="Value">Reference of a variable with Param values</param>
* */
public abstract CmsError NC_RParam(short Index, ref int Value);
/**
* <summary>Read Real Parameter Machine (Not compatible for Axis Parameter (Multiple values in a parameter)
* <para>
* Compatibility: Fanuc
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Index">Index of the parameter</param>
* <param name="Value">Reference of a variable with Param values</param>
* */
public abstract CmsError NC_RParam(short Index, ref double Value);
#endregion NC Low-level data (to override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region PLC High-level data (to override)
public abstract CmsError PLC_RWManageWatchdog();
/**
* <summary>
* Read PMC active Messages
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="Alarms">Reference of a List of String Variables where data will be saved</param>
* */
public abstract CmsError PLC_RActiveMessages(ref List<PlcAlarmModel> Alarms);
/**
* <summary>
* Start refresh message procedure
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="id">Alarm id to refresh</param>
* * */
public abstract CmsError PLC_WRefreshMessage(uint id);
public abstract CmsError PLC_WRefreshAllMessages();
/**
* <summary>
* Start restore message procedure
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="id">Alarm id to restore</param>
*
* */
public abstract CmsError PLC_WRestoreMessage(uint id);
/**
* <summary>
* Read the status of the Power on data ( Pre-Power-On / Post-Power-On )
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* </summary>
* <param name="powerOnModel"> Reference to the structure where the power on data will be saved</param>
**/
public abstract CmsError PLC_RPowerOnData(ref PreAndPostPowerOnModel powerOnModel);
/**
* <summary>
* Write PowerOn data and status ( Pre-Power-On / Post-Power-On )
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* </summary>
* <param name="id"> Id of the edited power on data </param>
* <param name="value"> Reference to the value of the power on data</param>
**/
public abstract CmsError PLC_WPowerOnData(uint id, bool value);
/**
* <summary>
* Read the status of the UI functionality from PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* </summary>
**/
public abstract CmsError PLC_RFunctionAccess(ref List<FunctionalityModel> functions);
/**
* <summary>
* Read axes reset procedure data from PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="functions">Reference to the axes reset procedure data</param>
* </summary>
**/
public abstract CmsError PLC_RAxesResetData(ref AxisResetDataModel axisResetData);
/**
* <summary>
* Read machine counters value from PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="counters">Reference to the counters data</param>
* </summary>
**/
public abstract CmsError PLC_RMachineCounters(ref List<CounterModel> counters);
/**
* <summary>
* Read nc softkeys values from PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="softKeys">Reference to the nc softkey data</param>
* </summary>
**/
public abstract CmsError PLC_RNcSoftKeys(ref List<SoftKeysModel> ncSoftKeys);
/**
* <summary>
* Read user softkeys values from PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="softKeys">Reference to the softkey data</param>
* </summary>
**/
public abstract CmsError PLC_RUserSoftKeys(ref List<SoftKeysModel> softKeys);
/**
* <summary>
* Write Nc softkey interaction into PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an when an internal or a library error occours</returns>
* <param name="id">Nc softkey id</param>
* </summary>
**/
public abstract CmsError PLC_WNcSoftKey(uint id);
/**
* <summary>
* Write user softkey interaction into PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="id">User softkey id</param>
* </summary>
**/
public abstract CmsError PLC_WUserSoftKey(uint id);
/**
* <summary>
* Read heads data from PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="heads">Recerence to the heads data</param>
* <param name="number">Number of heads data that are read</param>
* </summary>
**/
public abstract CmsError PLC_RHeadsData(List<HeadDataModel> heads, int number);
/**
* <summary>
* Write head override sign into PLC
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="id">Head id</param>
* <param name="sign">Type of increment of the override</param>
* </summary>
**/
public abstract CmsError PLC_WHeadOverride(uint id, HEAD_OVERRIDE_SIGN sign);
public abstract CmsError PLC_ROperatorInputIsNeeded(ref List<M155InputIsNeededModel> value);
public abstract CmsError PLC_WOperatorInputResponse(int process, double responseVal);
public abstract CmsError PLC_RM154Data(ref List<M154DataModel> value, ref bool MTCCmd);
public abstract CmsError PLC_W154ManageAck(int processId);
public abstract CmsError PLC_RScadaValue(string memIndex, SCADA_MEM_TYPE memType, ref object value);
public abstract CmsError PLC_WScadaValue(string memIndex, SCADA_MEM_TYPE memType, object value);
public abstract CmsError PLC_RWorkedTimeHead(int head, ref uint time);
public abstract CmsError PLC_WResetWorkedTimeHead(int head);
public abstract CmsError PLC_RWorkedTimeMachine(ref uint time);
public abstract CmsError PLC_WResetWorkedTimeMachine(uint time);
public abstract CmsError PLC_RCandy(ref int value);
public abstract CmsError PLC_WCandy(int value);
public abstract CmsError PLC_RExpiredCandy(ref bool value);
public abstract CmsError PLC_WExpiredCandy(bool value);
#endregion PLC High-level data (to override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region PROCESS (PATH, CHANNEL) data (to override)
/**
* <summary>
* Read the actual status of the Process "ProcNumber"
* <para>See <see cref="Nc.PROC_STATUS"/> for information about the PROC_Status type</para>
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process number which the data refer</param>
* <param name="Status">Reference of a PROC_Status Variable where data will be saved</param>
* */
public abstract CmsError PROC_RStatus(ushort ProcNumber, ref PROC_STATUS Status);
/**
* <summary>
* Read the selected Mode Process "ProcNumber"
* <para>See <see cref="Nc.PROC_MODE"/> for information about the PROC_Status type</para>
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process number which the data refer</param>
* <param name="Mode">Reference of a PROC_Mode Variable where data will be saved</param>
* */
public abstract CmsError PROC_RMode(ushort ProcNumber, ref PROC_MODE Mode);
/**
* <summary>
* Read active alarms of the process "ProcNumber". For OSAI Nc the list can contain only one Message
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process number which the data refer</param>
* <param name="Alarms">Reference of a List of String Variables where data will be saved</param>
* */
public abstract CmsError PROC_RActiveAlarms(ushort procNumber, ref List<AlarmModel> alarms);
/**
* <summary>
* Read actual & Next Lines of active PP
* <para>
* Compatibility: Fanuc | Osai | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="procNumber">Process number which the data refer</param>
* <param name="Lines">Reference of a List of String Variables where data will be saved</param>
* */
public abstract CmsError PROC_RPPLines(ushort procNumber, ref List<string> Lines);
/**
* <summary>
* Read active PP Name
* <para>
* Compatibility: Fanuc | Osai | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="procNumber">Process number which the data refer</param>
* <param name="Name">Reference of a String Variables where data will be saved</param>
* */
public abstract CmsError PROC_RSelectedPPName(ushort procNumber, ref string Name);
/**
*<summary>
* Read active PP and generic data
* <para>
* Compatibility: Fanuc | Osai | Siemens
* </para>
* <param name="procNumber">Process number which the data refer</param>
* <param name="processData">Reference to part program data structure</param>
* </summary>
**/
public abstract CmsError PROC_RStatusAndData(ushort procNumber, ref ProcessDataModel processData);
/**
*<summary>
* Read selected process
* <para>
* Compatibility: Fanuc | Osai | Siemens
* </para>
* <param name="procNumber">Reference to the process number selected</param>
* </summary>
**/
public abstract CmsError PROC_RSelectedProcess(ref ushort procNumber);
/**
*<summary>
* Change the selected process
* <para>
* Compatibility: Fanuc | Osai | Siemens
* </para>
* <param name="procNumber">New selected process number</param>
* </summary>
**/
public abstract CmsError PROC_WSelectProcess(ushort procNumber);
public abstract CmsError PROC_RSelectedProcessData(int processId, ref SelectedProcessData processData);
public abstract CmsError PLC_WAssistedToolingCmd(ushort toolId, ushort familyId, ushort shankId, ushort magazineId, ushort positionId, ASSISTED_TOOLING_ACTION action);
public abstract CmsError PLC_RAssistedToolingData(ref AssistedToolingModel data);
public abstract CmsError PLC_WTerminateAssistedToolingProcedure();
#endregion PROCESS (PATH, CHANNEL) data (to override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region AXES data (to override)
/**
* <summary>
* Read the Interpolated position of all axes in Process "ProcNumber"
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process to execute the action</param>
* <param name="Axes">Reference of Dictionary "Key,Value" with: Key: Axis Name, Value: Position</param>
* */
public abstract CmsError AXES_RInterpPosition(ushort ProcNumber, ref Dictionary<string, double> Axes);
/**
* <summary>
* Read the Programmed position of all axes in Process "ProcNumber".
* For Fanuc-Nc there's not "Programmed position" variables. Si it is calculated from Machine-Pos and Distance-to-go
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process to execute the action</param>
* <param name="Axes">Reference of Dictionary "Key,Value" with: Key: Axis Name, Value: Position</param>
* */
public abstract CmsError AXES_RProgrPosition(ushort ProcNumber, ref Dictionary<string, double> Axes);
/**
* <summary>
* Read the Machine position of all axes in Process "ProcNumber"
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process to execute the action</param>
* <param name="Axes">Reference of Dictionary "Key,Value" with: Key: Axis Name, Value: Position</param>
* */
public abstract CmsError AXES_RMachinePosition(ushort ProcNumber, ref Dictionary<string, double> Axes);
/**
* <summary>
* Read the Following-Error of all axes in Process "ProcNumber"
* <para>
* Compatibility: Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process to execute the action</param>
* <param name="Axes">Reference of Dictionary "Key,Value" with: Key: Axis Name, Value: Position</param>
* */
public abstract CmsError AXES_RFollowingError(ushort ProcNumber, ref Dictionary<string, double> Axes);
/**
* <summary>
* Read the Distance-to-go of all axes in Process "ProcNumber"
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="ProcNumber">Process to execute the action</param>
* <param name="Axes">Reference of Dictionary "Key,Value" with: Key: Axis Name, Value: Position</param>
* */
public abstract CmsError AXES_RDistanceToGo(ushort ProcNumber, ref Dictionary<string, double> Axes);
public abstract CmsError AXES_RAxesNames(ushort process, ref List<AxisModel> axesData);
public abstract CmsError AXES_RSelectedAxis(ref byte axisId);
public abstract CmsError AXES_WSelectAxis(byte axisId);
#endregion AXES data (to override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region MEMORY Low-level function: single valiable in memory (to override)
/**
* <summary>Read/Write Boolean variable from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="MemBit">Set the Bit to Read-Write. (0..7)</param>
* <param name="Value">Reference to variable to read/Write</param>
* */
public abstract CmsError MEM_RWBoolean(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int MemBit, ref bool Value);
/**
* <summary>Read/Write Boolean variable from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="MemBit">Set the Bit to Read-Write. (0..7)</param>
* <param name="Value">Reference to variable to read/Write</param>
* */
public abstract CmsError MEM_RWBoolean(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int MemBit, ref bool Value);
/**
* <summary>Read/Write Byte variable from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="MemByteStart">Set to 1 if the Byte is the second of a WORD (only for OSAI Nc)</param>
* <param name="Value">Reference to variable to read/Write</param>
* */
public abstract CmsError MEM_RWByte(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int MemByte, ref byte Value);
/**
* <summary>Read/Write Byte variable from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="MemByteStart">Set to 1 if the Byte is the second of a WORD (only for OSAI Nc)</param>
* <param name="Value">Reference to variable to read/Write</param>
* */
public abstract CmsError MEM_RWByte(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int MemByte, ref byte Value);
/**
* <summary>Read/Write unsigned 2 Byte (NC: Word:, .NET: ushort) variable from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWWord(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, ref ushort Value);
/**
* <summary>Read/Write unsigned 2 Byte (NC: Word:, .NET: ushort) variable from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWWord(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, ref ushort Value);
/**
* <summary>Read/Write signed 2 Byte (NC: Word:, .NET: short) variable from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWShort(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, ref short Value);
/**
* <summary>Read/Write signed 2 Byte (NC: Word:, .NET: short) variable from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWShort(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, ref short Value);
/**
* <summary>Read/Write signed 4 Byte (NC: DWord:, .NET: uint) variable from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>uW
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWDWord(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, ref uint Value);
/**
* <summary>Read/Write signed 4 Byte (NC: DWord:, .NET: uint) variable from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>uW
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWDWord(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, ref uint Value);
/**
* <summary>Read/Write signed 4 Byte (NC: DWord:, .NET: int) variable from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWInteger(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, ref int Value);
/**
* <summary>Read/Write signed 4 Byte (NC: DWord:, .NET: int) variable from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWInteger(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, ref int Value);
public abstract CmsError MEM_RWDouble(bool bWrite, int process, MEMORY_TYPE memType, int memIndex, ref double value);
public abstract CmsError MEM_RWDouble(bool bWrite, int process, MEMORY_TYPE memType, int memTable, int memIndex, ref double value);
#endregion MEMORY Low-level function: single valiable in memory (to override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region NC Low-level function: variables List in memory (to override)
/**
* <summary>Read/Write List of Byte from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="MemByteStart">Set to 1 if the starting Byte is the second of a WORD (only for OSAI Nc)</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWByteList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int MemByteStart, int Number, ref List<byte> Value);
/**
* <summary>Read/Write List of Byte from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="MemByteStart">Set to 1 if the starting Byte is the second of a WORD (only for OSAI Nc)</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWByteList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int MemByteStart, int Number, ref List<byte> Value);
/**
* <summary>Read/Write List of unsigned 2 Byte (NC: Word:, .NET: ushort) from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWWordList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int Number, ref List<ushort> Value);
/**
* <summary>Read/Write List of unsigned 2 Byte (NC: Word:, .NET: ushort) from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWWordList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int Number, ref List<ushort> Value);
/**
* <summary>Read/Write List of signed 2 Byte (NC: Word:, .NET: short) from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWShortList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int Number, ref List<short> Value);
/**
* <summary>Read/Write List of signed 2 Byte (NC: Word:, .NET: short) from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWShortList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int Number, ref List<short> Value);
/**
* <summary>Read/Write List of unsigned 4 Byte (NC: DWord:, .NET: uint) from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWDWordList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int Number, ref List<uint> Value);
/**
* <summary>Read/Write List of unsigned 4 Byte (NC: DWord:, .NET: uint) from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or <see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWDWordList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int Number, ref List<uint> Value);
/**
* <summary>Read/Write List of signed 4 Byte (NC: DWord:, .NET: int) from/into NC Memory Area
* <para>
* Compatibility: Fanuc | Osai | Demo
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or Nc.<see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWIntegerList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int Number, ref List<int> Value);
/**
* <summary>Read/Write List of signed 4 Byte (NC: DWord:, .NET: int) from/into NC Memory Area (including Siemens Nc)
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="bWrite">Set True to Write-operation (Also Allowed <see cref="Nc.W"/>/<see cref="Nc.R"/>)</param>
* <param name="Process">Process to perform operation (If the area is process-indipendent use 0 or Nc.<see cref="Nc.UNDEF_PROC"/>)</param>
* <param name="MemType">Nc Memory Area. See <see cref="Nc.MEMORY_TYPE"/></param>
* <param name="MemTable">Siemens Memory Table (Used only in Siemens-Nc)</param>
* <param name="MemIndex">Starting Index of Memory Area</param>
* <param name="Number">Number of sequential data Read/Write. (Used only in Reading Operation)</param>
* <param name="Value">List of values to read/Write</param>
* */
public abstract CmsError MEM_RWIntegerList(bool bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int Number, ref List<int> Value);
#endregion NC Low-level function: variables List in memory (to override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region File Management (To override)
/**
* <summary>Get file list of a specific path
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="directoryPath">Directory path to read file list</param>
* */
public abstract CmsError FILES_RGetFileList(string directoryPath, ref List<PreviewFileModel> files);
/**
* <summary>Get file generic informations
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="filePath">File path to read file data</param>
* */
public abstract CmsError FILES_RGetFileInfo(string filePath, ref InfoFile fileInfo);
/**
* <summary>Set a program, stored in the NC, as active for the process
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="processId">Process where the program is going to be activated</param>
* <param name="filePath">Path of the part program</param>
* */
public abstract CmsError FILES_WSetActiveProgram(int processId, string filePath, ref ActiveProgramDataModel data);
/**
* <summary>Deactivate active program on <paramref name="processId"/>
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <param name="processId">Process where the program is going to be deactivated</param>
* */
public abstract CmsError FILES_WDeactivateProgram(int processId);
public abstract CmsError FILES_UploadPartProgram(string localPath, string name, ref string newFilePath);
/**
* <summary>Read active program on <paramref name="processId"/> data
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <param name="processId">Process id where the program is active</param>
* */
public abstract CmsError FILES_RActiveProgramData(int processId, ref ActiveProgramDataModel data);
/**
* <summary>Read a Part Program by path and name
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="partProgramPath">Path of the Part Program stored in the Nc</param>
* <param name="partProgramLocalName">Name of the Part Program and name of new local file</param>
* <param name="localFile">Reference to the new local file where the NC Part Program data will be saved</param>
* */
public abstract CmsError FILES_RProgramToFile(string partProgramPath, FileStream localFile);
/**
* <summary>Write/Overwrite a Part Program by path and name
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="partProgramPath">Path of the Part Program stored in the Nc</param>
* <param name="localFile">Reference to the local Part Program file</param>
* */
public abstract CmsError FILES_WProgramFromFile(string partProgramPath, FileStream localFile);
/**
* <summary>Copy a Part Program into another path
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="partProgramPath">Path where the part program is going to be stored in the NC</param>
* <param name="newPartProgramPath">Path of the copy Part Program destination</param>
* <param name="failIfExist">
* <see langword="true"/>: Return an error if file exists.
* <para>
* <see langword="false"/>: Overwrite file if exists
* </para>
* </param>
*/
public abstract CmsError FILES_CopyProgram(string partProgramPath, string newPartProgramPath, bool failIfExist);
/**
* <summary>Delete a Nc Part Program
* <para>
* Compatibility: Fanuc | Osai | Demo | Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="partProgramPath">Path where the Nc Part Program is saved in the NC</param>
* <param name="partProgramName">Name of the Part Program file</param>
* */
public abstract CmsError FILES_DeleteProgram(string partProgramPath, string partProgramName);
public abstract CmsError FILES_RQueueData(ref List<QueueStatusModel> statusList);
public abstract CmsError FILES_RQueueDataByProcess(ref QueueStatusModel status, int processId);
public abstract CmsError FILES_WStartQueue();
public abstract CmsError FILES_WStopQueue();
public abstract CmsError FILES_WLoadNextPartProgram(string localPath, string ncFileName);
public abstract CmsError FILES_WUploadJobFilesAndActivate(int processId, string jobExtractedPath, string fileToActivate);
public abstract CmsError FILES_RGetProgramType(ref PROGRAM_TYPE_ENUM programType);
public abstract CmsError FILES_WCleanUploadFolder();
#endregion File Management (To override)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Tool Table Siemens
/**
* <summary>Read Adatpive Path Step
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="config">Reference to the tool table configuration data</param>
**/
public abstract CmsError TOOLS_RAdatpivePathStep(ref Byte step);
/**
* <summary>Write Adatpive Path Step
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="config">Reference to the tool table configuration data</param>
**/
public abstract CmsError TOOLS_WAdatpivePathStep(Byte step);
/**
* <summary>Read tool table configuration
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="config">Reference to the tool table configuration data</param>
**/
public abstract CmsError TOOLS_RConfiguration(ref ToolTableConfiguration config);
/**
* <summary>Read tools data from NC
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="tools">Reference to the tools list data object</param>
**/
public abstract CmsError TOOLS_RToolsData(ref List<SiemensToolModel> toolsData);
/**
* <summary>Read shanks data from NC
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="config">Reference to the shank list data object</param>
**/
public abstract CmsError TOOLS_RShanksData(ref List<ShankModel> shanksData);
/**
* <summary>Read families data
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="config">Reference to the tools families data object</param>
**/
public abstract CmsError TOOLS_RFamilyData(ref List<FamilyModel> families);
/**
* <summary>Read magazines positions data from NC
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="config">Reference to the tools list data object</param>
**/
public abstract CmsError TOOLS_RMagazinePositions(ref List<PositionModel> positions);
/**
* <summary>Add a new tool
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
**/
public abstract CmsError TOOLS_WAddTool(ref SiemensToolModel tool);
/**
* <summary>Add a new family
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
**/
public abstract CmsError TOOLS_WAddFamily(ref FamilyModel family);
/**
* <summary>Add a new shank
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
**/
public abstract CmsError TOOLS_WAddShank(ref ShankModel shank);
/**
* <summary>Update family name
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="oldName">Family identifier</param>
* <param name="newName">New family name value</param>
**/
public abstract CmsError TOOLS_WUpdateFamilyData(string oldName, string newName);
/**
* <summary>Update magazine position data
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="positionData">New position data</param>
**/
public abstract CmsError TOOLS_WUpdatePosition(PositionModel positionData);
/**
* <summary>Update tool data
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="toolData">New tool data</param>
**/
public abstract CmsError TOOLS_WUpdateTool(ref SiemensToolModel toolData);
/**
* <summary>Delete tool
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="id">Tool identifier</param>
**/
public abstract CmsError TOOLS_WDeleteTool(int id);
/**
* <summary>Delete shank
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="id">Shank id</param>
**/
public abstract CmsError TOOLS_WDeleteShank(int id);
/**
* <summary>Delete family
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="name">Family identifier</param>
**/
public abstract CmsError TOOLS_WDeleteFamily(string name);
/**
* <summary>Delete edge
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="toolId">Tool id</param>
* <param name="edgeId">Edge id</param>
**/
public abstract CmsError TOOLS_WDeleteEdge(int toolId, int edgeId);
/**
* <summary>Add a new edge to tool
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="toolId">Tool id</param>
**/
public abstract CmsError TOOLS_WAddEdge(int toolId, ref EdgeModel edge);
/**
* <summary>Update edge
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="toolId">Tool id</param>
* <param name="newEdge">New edge data</param>
**/
public abstract CmsError TOOLS_WUpdateEdge(int toolId, ref EdgeModel newEdge);
/**
* <summary>Update shank
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="shankData">New shank data</param>
**/
public abstract CmsError TOOLS_WUpdateShank(ref ShankModel shankData);
/**
* <summary>Read mounted tool in magazine
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="magazineId">Magazine id</param>
**/
public abstract CmsError TOOLS_RMountedTools(int magazineId, ref List<MountedToolModel> magazinePos);
/**
* <summary>Read available tools/multitools (not mounted)
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="magazineId">Magazine id</param>
**/
public abstract CmsError TOOLS_RAvailableTools(ref List<ShankModel> multitools, ref List<SiemensToolModel> tools);
/**
* <summary>Load a tool in magazine
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="magazineId">Magazine id</param>
* <param name="newMagazineTool">Object that contains references to position id and tool id</param>
**/
public abstract CmsError TOOLS_WLoadToolInMagazine(int magazineId, NewToolInMagazineModel newMagazineTool, ref MountedToolModel newMountedTool);
/**
* <summary>Unload tool from magazine
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="magazineId">Magazine id</param>
* <param name="positionId">Position id</param>
**/
public abstract CmsError TOOLS_WUnloadToolFromMagazine(int magazineId, int positionId);
/**
* <summary>Load tool into shank
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="shankId">Shank id</param>
* <param name="positionId">Position id</param>
* <param name="toolId">Tool id</param>
**/
public abstract CmsError TOOLS_WLoadToolIntoShank(int shankId, int positionId, int toolId);
/**
* <summary>Unload tool from shank
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
* <param name="shankId">Shank id</param>
* <param name="positionId">Position id</param>
**/
public abstract CmsError TOOLS_WUnloadToolFromShank(int shankId, int positionId);
/**
* <summary>Get actual magazine status
* <para>
* Compatibility: Siemens
* </para>
* </summary>
* <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
**/
public abstract CmsError TOOLS_RMagazineAction(ref MagazineActionModel magazineAction);
#endregion Tool Table Siemens
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Nc Tool Manager
public abstract CmsError TOOLS_WOptions(ToolManagerOptionsModel options);
public abstract CmsError TOOLS_ROffset(short offsetId, ref OffsetModel offset);
public abstract CmsError TOOLS_WOffset(short offsetId, OffsetModel offset);
public abstract CmsError TOOLS_WStartEditData();
public abstract CmsError TOOLS_WStopEditData();
public abstract CmsError TOOLS_WUpdateTools(List<NcToolModel> list);
public abstract CmsError TOOLS_WUpdateFamilies(List<NcFamilyModel> list);
public abstract CmsError TOOLS_WUpdateShanks(List<NcShankModel> list);
public abstract CmsError TOOLS_WUpdateMagazinePositions(List<NcMagazinePositionModel> list);
public abstract CmsError TOOLS_WStartEditTooling(int magazineId);
public abstract CmsError TOOLS_WStopEditTooling(int magazineId);
public abstract CmsError TOOLS_WRestoreBackup();
public abstract CmsError TOOLS_RMagazineConfig(ref List<NcMagazineConfigModel> config);
public abstract CmsError TOOLS_RUpdatedToolsData(ref Dictionary<int, byte> updatedStatus, ref Dictionary<int, uint> updatedLives);
public abstract CmsError TOOLS_RStoredData();
public abstract CmsError TOOLS_RMagazineBlock(ref List<int> ids);
public abstract CmsError TOOLS_WFreeMagazines();
public abstract CmsError TOOLS_RMagazineStatus(ref Dictionary<int, bool> magazineStatus);
#endregion Nc Tool Manager
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CONSTANTS (Struct and Enum are Static for definition)
public const int REFRESH_ALL_ALARMS_SFKEY_INDEX = 29;
// Read Write type
/** <summary>Write action</summary> */
public const bool W = true;
/** <summary>Read action</summary> */
public const bool R = false;
/** <summary>Not-Defined Process</summary> */
public const ushort UNDEF_PROC = 0;
// R-W MEMORY Type
/** <summary>Nc Memory Type (Table)</summary> */
public enum MEMORY_TYPE
{
/** <summary>Null Type</summary> */
Null = -1,
///////////////////////////////////////////////////////////////////
//Fanuc Memory Type
/** <summary>Fanuc G Area</summary> */
Fanuc_G = 0,
/** <summary>Fanuc F Area</summary> */
Fanuc_F = 1,
/** <summary>Fanuc Y Area</summary> */
Fanuc_Y = 2,
/** <summary>Fanuc X Area</summary> */
Fanuc_X = 3,
/** <summary>Fanuc A Area</summary> */
Fanuc_A = 4,
/** <summary>Fanuc R Area</summary> */
Fanuc_R = 5,
/** <summary>Fanuc T Area</summary> */
Fanuc_T = 6,
/** <summary>Fanuc K Area</summary> */
Fanuc_K = 7,
/** <summary>Fanuc C Area</summary> */
Fanuc_C = 8,
/** <summary>Fanuc D Area</summary> */
Fanuc_D = 9,
/** <summary>Fanuc M Area</summary> */
Fanuc_M = 10,
/** <summary>Fanuc N Area</summary> */
Fanuc_N = 11,
/** <summary>Fanuc E Area</summary> */
Fanuc_E = 12,
/** <summary>Fanuc Z Area</summary> */
Fanuc_Z = 13,
/** <summary>Fanuc CM Area</summary> */
Fanuc_CM = 100,
///////////////////////////////////////////////////////////////////
//Osai Memory Type
/** <summary>Osai I Area</summary> */
Osai_I = 0,
/** <summary>Osai O Area</summary> */
Osai_O = 1,
/** <summary>Osai MW Area</summary> */
Osai_MW = 20,
/** <summary>Osai GW Area</summary> */
Osai_GW = 21,
/** <summary>Osai SW Area</summary> */
Osai_SW = 22,
/** <summary>Osai PW Area</summary> */
Osai_PW = 62,
/** <summary>Osai UW Area</summary> */
Osai_UW = 63,
/** <summary>Osai MD Area</summary> */
Osai_MD = 40,
/** <summary>Osai GD Area</summary> */
Osai_GD = 41,
/** <summary>Osai SD Area</summary> */
Osai_SD = 42,
/** <summary>Osai PD Area</summary> */
Osai_PD = 43,
/** <summary>Osai UD Area</summary> */
Osai_UD = 44,
/** <summary>Osai L Area</summary> */
Osai_L = 145,
/** <summary>Osai LS Area</summary> */
Osai_LS = 18,
/** <summary>Osai AA Area</summary> */
Osai_AA = 28,
/** <summary>Osai A Area</summary> */
Osai_A = 45,
/** <summary>Osai SC Area</summary> */
Osai_SC = 50,
/** <summary>Osai SYMO Area</summary> */
Osai_SYMO = 102,
///////////////////////////////////////////////////////////////////
//Siemens Memory Type,
/** <summary>Siemens DB</summary> */
Siemens_DB = 0,
///////////////////////////////////////////////////////////////////
// Demo memory type
/**<summary>Demo default memory</summary> **/
Demo = 0
};
// NC Memory Type Name
internal const string FANUC_MEMTYPE = "Fanuc_";
internal const string SIEMENS_MEMTYPE = "Siemens_";
internal const string OSAI_MEMTYPE = "Osai_";
internal const string DEMO_MEMTYPE = "Demo_";
internal const string UNDEFINED_MEMTYPE = "Null";
// min-time to read static data (Cached values)
internal const ushort NC_MIN_SEC_READ_STATIC_DATA = 10;
//Fanuc Variable & Const
internal const short FANUC_MAXNVAR = 1024;
internal const short FANUC_MAXMSGCNC = 10;
internal const short FANUC_MAXMSGPMC = 5;
internal const short FANUC_ABSOLUTEPOS = 0;
internal const short FANUC_MACHINEPOS = 1;
internal const short FANUC_RELATIVEPOS = 2;
internal const short FANUC_DISTTOGO = 3;
internal const short FANUC_ALLPOS = -1;
internal enum FANUC_DType : short { BYTE = 0, WORD = 1, LONG = 2 };
internal const ushort OSAI_PROGRAMMEDPOS = 1;
internal const ushort OSAI_INTERPOLPOS = 2;
internal const ushort OSAI_TRANSDUCERPOS = 3;
internal const ushort OSAI_FOLLERROR = 4;
internal const ushort OSAI_DISTTOGO = 5;
internal const ushort OSAI_MACHINEPOS = 6;
/** <summary>Nc Screen</summary> */
public enum SCREEN_PAGE
{
//Siemens
Siemens_Machine = 100,
Siemens_Parameter = 101,
Siemens_Program = 102,
Siemens_ProgramManager = 103,
Siemens_Diagnostics = 104,
Siemens_Setup = 105,
//Fanuc
Fanuc_Pos = 200,
Fanuc_Prog = 201,
Fanuc_Offset = 202,
Fanuc_System = 203,
Fanuc_Message = 204,
Fanuc_Graph = 205,
Fanuc_Custom1 = 206,
Fanuc_Custom2 = 207,
}
#endregion CONSTANTS (Struct and Enum are Static for definition)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Fixed memory area
// TODO REMOVE
//Lingua CN
internal MEMORY_CELL PARAM_LING_FANUC = new MEMORY_CELL(MEMORY_TYPE.Null, 3281, 0, 1);
internal MEMORY_CELL PARAM_LING_FANUC_W = new MEMORY_CELL(MEMORY_TYPE.Fanuc_G, 581, 0, 1);
//Matricola Macchina
internal MEMORY_CELL MATR_MACCH_FANUC = new MEMORY_CELL(MEMORY_TYPE.Fanuc_D, 4018, 0, 1);
internal MEMORY_CELL MATR_MACCH_SIEMENS = new MEMORY_CELL(MEMORY_TYPE.Siemens_DB, 255, 0, 1);
#endregion Fixed memory area
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Helper Function
internal void AddNcAlarmToList(uint id, string message, DateTime dateTime, List<AlarmModel> alarms)
{
alarms.Add(new AlarmModel()
{
Id = id,
Message = message,
IsWarning = false,
Process = 0,
DateTime = dateTime
});
}
internal void AddAlarmToList(int id, short axisId, string message, int process, DateTime dateTime, List<AlarmModel> alarms)
{
alarms.Add(new AlarmModel()
{
Id = Convert.ToUInt32((id & 0xffff) | (axisId << 24)), // Set last byte with axisId in order to have unique ids
Message = message,
IsWarning = false,
Process = process,
DateTime = dateTime
});
}
internal void AddAlarmToList(uint id, string message, int process, List<AlarmModel> alarms)
{
alarms.Add(new AlarmModel()
{
Id = id,
Message = message,
IsWarning = false,
Process = process
});
}
internal void AddPlcAlarmsToList(uint id, bool isWaring, bool restorationIsActive, List<int> processes, List<PlcAlarmModel> alarms)
{
alarms.Add(new PlcAlarmModel()
{
Id = id,
IsWarning = isWaring,
RestorationIsActive = restorationIsActive,
Process = processes
});
}
#endregion Helper Function
}
}