d08bf19bc5
Added functionality Added Axes Reset
1292 lines
61 KiB
C#
1292 lines
61 KiB
C#
using CMS_CORE_Library;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Globalization;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using static CMS_CORE_Library.DataStructures;
|
|
|
|
|
|
namespace CMS_CORE
|
|
{
|
|
public abstract partial class Nc
|
|
{
|
|
//Private Global Variables
|
|
internal Boolean Connected;
|
|
internal String Ip;
|
|
internal ushort Port;
|
|
internal Boolean UseProxy;
|
|
internal String LibName = "CMS_CORE_Library.dll";
|
|
|
|
//Osai Variable
|
|
internal string OSAI_PlcMessagesPath = @"C:\CMS\OSAI\";
|
|
internal string OSAI_WinNbiPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\OSAI\WinNBI\";
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#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
|
|
|
|
#region LIB Methods (OSAI)
|
|
|
|
/**
|
|
* <summary>
|
|
* Get if the library uses Windows proxy
|
|
* <para>
|
|
* Compatibility: Osai
|
|
* </para>
|
|
* </summary>
|
|
* */
|
|
public Boolean LIB_GetWindowsProxy() { return UseProxy; }
|
|
|
|
|
|
/**
|
|
* <summary>
|
|
* Set if the library need to use Windows proxy
|
|
* <para>
|
|
* Compatibility: Osai
|
|
* </para>
|
|
* </summary>
|
|
* */
|
|
public void LIB_SetWindowsProxy(Boolean proxy) { UseProxy = proxy; }
|
|
|
|
|
|
/**
|
|
* <summary>
|
|
* Get the path of PLC Messages Folder
|
|
* <para>
|
|
* Compatibility: Osai
|
|
* </para>
|
|
* </summary>
|
|
* */
|
|
public string LIB_GetPlcMsgsPath() { return OSAI_PlcMessagesPath; }
|
|
|
|
|
|
/**
|
|
* <summary>
|
|
* Set the path of PLC Messages Folder
|
|
* <para>
|
|
* Compatibility: Osai
|
|
* </para>
|
|
* </summary>
|
|
* */
|
|
public void LIB_SetPlcMsgsPath(string folder) { OSAI_PlcMessagesPath = folder; }
|
|
|
|
|
|
/**
|
|
* <summary>
|
|
* Get the path of Win-Nbi installation
|
|
* <para>
|
|
* Compatibility: Osai
|
|
* </para>
|
|
* </summary>
|
|
* */
|
|
public string LIB_GetWinNbiPath() { return OSAI_WinNbiPath; }
|
|
|
|
|
|
/**
|
|
* <summary>
|
|
* Set the path of Win-Nbi installation
|
|
* <para>
|
|
* Compatibility: Osai
|
|
* </para>
|
|
* </summary>
|
|
* */
|
|
public void LIB_SetWinNbiPath(string folder) { OSAI_WinNbiPath = folder; }
|
|
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#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 Boolean 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>
|
|
* 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);
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#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 Boolean 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
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#region PLC High-level data (to override)
|
|
|
|
/**
|
|
* <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<AlarmModel> Alarms);
|
|
|
|
/**
|
|
* <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 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="id"> Id of the edited power on data </param>
|
|
* <param name="value"> New value of the power on data</param>
|
|
**/
|
|
public abstract CmsError PLC_WPowerOnData(uint id, bool value);
|
|
|
|
/**
|
|
* <summary>
|
|
* Read the status of the functions of the UI
|
|
* <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
|
|
* <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 of the data of axes reset procedure</param>
|
|
* </summary>
|
|
**/
|
|
public abstract CmsError PLC_RAxesResetData(ref AxisResetDataModel axisResetData);
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#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 to execute the action</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 to execute the action</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 to execute the action</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 to execute the action</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 to execute the action</param>
|
|
* <param name="Name">Reference of a String Variables where data will be saved</param>
|
|
* */
|
|
public abstract CmsError PROC_RPPName(ushort procNumber, ref String Name);
|
|
|
|
/**
|
|
*<summary>
|
|
* Read process active part program generic data
|
|
* <para>
|
|
* Compatibility: Fanuc | Osai | Siemens
|
|
* </para>
|
|
* <param name="procNumber">Process to execute the action</param>
|
|
* <param name="processData">Reference to part program data structure</param>
|
|
* </summary>
|
|
**/
|
|
public abstract CmsError PROC_RStatusAndData(ushort procNumber, ref ProcessDataModel processData);
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#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);
|
|
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#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(Boolean bWrite, int Process, MEMORY_TYPE MemType, int MemIndex, int MemBit, ref Boolean 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(Boolean bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int MemBit, ref Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, ref int Value);
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean 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(Boolean bWrite, int Process, MEMORY_TYPE MemType, int MemTable, int MemIndex, int Number, ref List<int> Value);
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#region File Management (To override)
|
|
|
|
/**
|
|
* <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 saved in the NC</param>
|
|
* <param name="newPartProgramPath">Path of the copy Part Program destination</param>
|
|
* <param name="failIfExist"></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);
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#region CONSTANTS (Struct and Enum are Static for definition)
|
|
|
|
// Read Write type
|
|
/** <summary>Write action</summary> */
|
|
public const Boolean W = true;
|
|
/** <summary>Read action</summary> */
|
|
public const Boolean R = false;
|
|
/** <summary>Not-Defined Process</summary> */
|
|
public const ushort UNDEF_PROC = 0;
|
|
|
|
|
|
/** <summary>Process-Status</summary> */
|
|
public enum PROC_STATUS : ushort
|
|
{
|
|
/** <summary>Idle-Status</summary> */
|
|
IDLE = 1,
|
|
/** <summary>Run-Status</summary> */
|
|
RUN = 2,
|
|
/** <summary>Hold-Status</summary> */
|
|
HOLD = 3,
|
|
/** <summary>Error-Status</summary> */
|
|
ERROR = 4,
|
|
/** <summary>Reset-Status</summary> */
|
|
RESET = 5,
|
|
/** <summary>Emergency-Status</summary> */
|
|
EMERG = 6
|
|
};
|
|
|
|
|
|
/** <summary>CMS-Process-Mode</summary> */
|
|
public enum PROC_MODE : ushort
|
|
{
|
|
/** <summary>Automatic-Mode</summary> */
|
|
AUTO = 1,
|
|
/** <summary>Edit-Mode</summary> */
|
|
EDIT = 2,
|
|
/** <summary>Mdi-Mode</summary> */
|
|
MDI = 3,
|
|
/** <summary>Remote-Mode</summary> */
|
|
REMOTE = 4,
|
|
/** <summary>Teach-Mode</summary> */
|
|
TEACH = 5,
|
|
/** <summary>Ref-Mode</summary> */
|
|
REF = 6,
|
|
/** <summary>Jog-Mode</summary> */
|
|
JOG = 7,
|
|
/** <summary>Joginc-Mode</summary> */
|
|
JOGINC = 8,
|
|
/** <summary>Ret_on_Profile-Mode</summary> */
|
|
RETPROF = 9,
|
|
/** <summary>Handle-Mode</summary> */
|
|
HANDLE = 10,
|
|
/** <summary>Restart-Mode</summary> */
|
|
RESTART = 11,
|
|
/** <summary>Error-Mode</summary> */
|
|
ERROR = 12
|
|
};
|
|
|
|
// 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 = 5;
|
|
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;
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#region Fixed memory area
|
|
|
|
// R-W MEMORY Cell
|
|
internal struct MEMORY_CELL
|
|
{
|
|
public readonly MEMORY_TYPE MemType;
|
|
public readonly int Address;
|
|
public readonly int SubAddress; //Only for Siemens
|
|
public readonly int Size;
|
|
|
|
public MEMORY_CELL(MEMORY_TYPE MType, int Addr, int SubAddr, int Sz)
|
|
{
|
|
MemType = MType;
|
|
Address = Addr;
|
|
SubAddress = SubAddr;
|
|
Size = Sz;
|
|
}
|
|
|
|
public MEMORY_CELL(MEMORY_TYPE MType, int Addr, int Sz)
|
|
{
|
|
MemType = MType;
|
|
Address = Addr;
|
|
SubAddress = 0;
|
|
Size = Sz;
|
|
}
|
|
}
|
|
|
|
//Lingua CN
|
|
internal MEMORY_CELL PARAM_LING_FANUC = new MEMORY_CELL(MEMORY_TYPE.Null, 3281, 0, 1);
|
|
|
|
//Matricola Macchina
|
|
internal MEMORY_CELL MATR_MACCH_OSAI = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 3403, 0, 1);
|
|
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);
|
|
|
|
//Messaggi PLC
|
|
internal MEMORY_CELL PLC_MESS_OSAI = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 12000, 0, 64);
|
|
|
|
|
|
#endregion
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
#region Helper Function
|
|
internal void AddAlarmToList(uint id, string message, List<AlarmModel> alarms)
|
|
{
|
|
alarms.Add(new AlarmModel()
|
|
{
|
|
Id = id,
|
|
Message = message,
|
|
IsWarning = false,
|
|
Process = 0
|
|
});
|
|
}
|
|
|
|
internal void AddAlarmToList(uint id, string message, int process, List<AlarmModel> alarms)
|
|
{
|
|
alarms.Add(new AlarmModel()
|
|
{
|
|
Id = id,
|
|
Message = message,
|
|
IsWarning = false,
|
|
Process = process
|
|
});
|
|
}
|
|
#endregion
|
|
}
|
|
}
|