• 大小: 585KB
    文件类型: .cs
    金币: 2
    下载: 2 次
    发布日期: 2021-06-14
  • 语言: C#
  • 标签: FANUC  

资源简介

发那科FANUC机床通讯协议FOCAS接口,包含通讯相关类及通讯接口说明书

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace FanucCNCDataCatch
{
    class fwlib
    {

            /* Axis define */
#if FS30D
    public const short MAX_AXIS = 32;
#elif M_AXIS2
    public const short MAX_AXIS = 24;
#elif FS15D
    public const short MAX_AXIS = 10;
#else
            public const short MAX_AXIS = 8;
#endif

            public const short ALL_AXES = (-1);
            public const short ALL_SPINDLES = (-1);
            public const short EW_OK = (short)focas_ret.EW_OK;

            /* Error Codes */
            public enum focas_ret
            {
                EW_PROTOCOL = (-17)           /* protocol error */
                EW_SOCKET = (-16)           /* Windows socket error */
                EW_NODLL = (-15)           /* DLL not exist error */
                EW_BUS = (-11)           /* bus error */
                EW_SYSTEM2 = (-10)           /* system error */
                EW_HSSB = (-9)           /* hssb communication error */
                EW_HANDLE = (-8)           /* Windows library handle error */
                EW_VERSION = (-7)           /* CNC/PMC version missmatch */
                EW_UNEXP = (-6)           /* abnormal error */
                EW_SYSTEM = (-5)           /* system error */
                EW_PARITY = (-4)           /* shared RAM parity error */
                EW_MMCSYS = (-3)           /* emm386 or mmcsys install error */
                EW_RESET = (-2)           /* reset or stop occured error */
                EW_BUSY = (-1)           /* busy error */
                EW_OK = 0           /* no problem */
                EW_FUNC = 1           /* command prepare error */
                EW_NOPMC = 1           /* pmc not exist */
                EW_LENGTH = 2           /* data block length error */
                EW_NUMBER = 3           /* data number error */
                EW_RANGE = 3           /* address range error */
                EW_ATTRIB = 4           /* data attribute error */
                EW_TYPE = 4           /* data type error */
                EW_DATA = 5           /* data error */
                EW_NOOPT = 6           /* no option error */
                EW_PROT = 7           /* write protect error */
                EW_OVRFLOW = 8           /* memory overflow error */
                EW_PARAM = 9           /* cnc parameter not correct error */
                EW_BUFFER = 10           /* buffer error */
                EW_PATH = 11           /* path error */
                EW_MODE = 12           /* cnc mode error */
                EW_REJECT = 13           /* execution rejected error */
                EW_DTSRVR = 14           /* data server error */
                EW_ALARM = 15           /* alarm has been occurred */
                EW_STOP = 16           /* CNC is not running */
 

评论

共有 条评论