public class FanucSeries0i extends NetworkDoubleBase
AlienSession, isPersistentConn, IsSocketError, isUseAccountCertificate, LogMsgFormatBinary, simpleHybirdLockCoreSocket, fileCacheSize, LogNet, Token| 构造器和说明 |
|---|
FanucSeries0i(String ipAddress,
int port)
根据IP及端口来实例化一个对象内容,端口一般默认为 8193
|
| 限定符和类型 | 方法和说明 |
|---|---|
OperateResult |
DeleteProgram(int program)
根据指定的程序号信息,删除当前的程序信息
According to the designated program number information, delete the current program information |
protected OperateResult |
ExtraOnDisconnect(Socket socket)
根据实际的协议选择是否重写本方法,有些协议在断开连接之前,需要发送一些报文来关闭当前的网络通道
Select whether to rewrite this method according to the actual protocol. |
protected INetMessage |
GetNewNetMessage()
获取一个新的消息对象的方法,需要在继承类里面进行重写
The method to get a new message object needs to be overridden in the inheritance class |
short |
getOperatePath()
获取当前操作的路径信息,默认为1,如果机床支持多路径的,可以设置为其他值。
|
Charset |
getTextEncoding()
获取当前的文本的字符编码信息
|
protected OperateResult |
InitializationOnConnect(Socket socket)
根据实际的协议选择是否重写本方法,有些协议在创建连接之后,需要进行一些初始化的信号握手,才能最终建立网络通道。
|
OperateResultExOne<Integer> |
ReadAlarmStatus()
读取报警状态信息
Read alarm status information |
OperateResultExOne<FileDirInfo[]> |
ReadAllDirectoryAndFile(String path)
读取指定路径下的所有的子路径和文件的信息,路径信息,例如 "//CNC_MEM/USER/"
|
OperateResultExOne<Integer> |
ReadAllDirectoryAndFileCount(String path)
获取指定的路径里所有的文件夹数量和文件数量之和,路径示例:例如 "//CNC_MEM/USER/", "//CNC_MEM/USER/PATH1/"
|
OperateResultExOne<Date> |
ReadCurrentDateTime()
读取机床的当前时间信息
Read the current time information of the machine tool |
OperateResultExOne<String> |
ReadCurrentForegroundDir()
读取当前程序的前台路径
Read the foreground path of the current program |
OperateResultExOne<Integer> |
ReadCurrentProduceCount()
读取当前的已加工的零件数量
Read the current number of processed parts |
OperateResultExOne<String> |
ReadCurrentProgram()
读取当前的程序内容,只能读取程序的片段,返回程序内容。
|
OperateResultExOne<CutterInfo[]> |
ReadCutterInfos(int cutterNumber)
读取当前的刀具补偿信息,默认刀具数量应该是24
Read current tool compensation information |
OperateResultExOne<Integer> |
ReadCutterNumber()
读取当前的正在使用的刀具号
Read the tool number currently in use |
OperateResultExOne<double[]> |
ReadDeviceWorkPiecesSize()
读取工件尺寸
Read workpiece size |
OperateResultExOne<Integer> |
ReadExpectProduceCount()
读取期望的加工的零件数量
Read the expected number of processed parts |
OperateResultExOne<double[]> |
ReadFanucAxisLoad()
读取伺服负载
Read servo load |
OperateResultExOne<Short> |
ReadLanguage()
读取机床的语言设定信息,具体值的含义参照API文档说明
Read the language setting information of the machine tool, refer to the API documentation for the meaning of the specific values |
OperateResultExOne<FanucOperatorMessage[]> |
ReadOperatorMessage()
读取机床的操作信息
Read machine operation information |
OperateResultExOne<String> |
ReadProgram(int program)
[商业授权] 读取指定程序号的程序内容
[Authorization] Read the program content of the specified program number |
OperateResultExOne<String> |
ReadProgram(int program,
String path)
[商业授权] 根据路径信息读取指定程序号的程序内容
[Authorization] Read the program content of the specified program number |
OperateResultExOne<int[]> |
ReadProgramList()
读取设备的程序列表
Read the program list of the device |
OperateResultExOne<byte[]> |
ReadRData(int start,
int end)
读取R数据,需要传入起始地址和结束地址,返回byte[]数据信息
To read R data, you need to pass in the start address and end address, and return byte[] data information |
OperateResultExTwo<Double,Double> |
ReadSpindleSpeedAndFeedRate()
主轴转速及进给倍率
Spindle speed and feedrate override |
OperateResultExOne<SysAllCoors> |
ReadSysAllCoors()
读取机床的坐标,包括机械坐标,绝对坐标,相对坐标
Read the coordinates of the machine tool, including mechanical coordinates, absolute coordinates, and relative coordinates |
OperateResultExOne<FanucSysInfo> |
ReadSysInfo()
获取fanuc机床设备的基本信息,型号,轴数量等等
|
OperateResultExOne<SysStatusInfo> |
ReadSysStatusInfo()
读取系统的基本信息状态,工作模式,运行状态,是否急停等等操作
Read the basic information status of the system, working mode, running status, emergency stop, etc. |
OperateResultExOne<SysAlarm[]> |
ReadSystemAlarm()
读取报警信息
Read alarm information |
OperateResultExOne<Double> |
ReadSystemMacroValue(int number)
读取宏变量,可以用来读取刀具号
Read macro variable, can be used to read tool number |
OperateResultExOne<double[]> |
ReadSystemMacroValue(int number,
int length)
读取宏变量,可以用来读取刀具号
Read macro variable, can be used to read tool number |
OperateResultExTwo<String,Integer> |
ReadSystemProgramCurrent()
读取程序名及程序号
Read program name and program number |
OperateResultExOne<Long> |
ReadTimeData(int timeType)
读取fanuc机床的时间,0是开机时间,1是运行时间,2是切割时间,3是循环时间,4是空闲时间,返回秒为单位的信息
Read the time of the fanuc machine tool, 0 is the boot time, 1 is the running time, 2 is the cutting time, 3 is the cycle time, 4 is the idle time, and returns the information in seconds. |
OperateResult |
SetCurrentProgram(short programNum)
设置指定的程序号为当前的主程序,如果程序号不存在,返回错误信息
Set the specified program number as the current main program, if the program number does not exist, an error message will be returned |
OperateResult |
SetDeviceProgsCurr(String programName)
设置指定路径为当前路径
Set the specified path as the current path |
void |
setOperatePath(short value)
设置当前操作的路径信息,默认为1,如果机床支持多路径的,可以设置为其他值。
|
void |
setTextEncoding(Charset value)
设置当前的文本的字符编码信息,如果你不清楚,可以调用 方法来自动匹配。
|
OperateResult |
StartProcessing()
启动加工程序
Start the processing program |
String |
toString()
返回当前对象表示的字符串
Returns the string represented by the current object |
OperateResult |
WriteCutterLengthShapeOffset(int cutter,
double offset)
根据刀具号写入长度形状补偿,刀具号为1-24
Write length shape compensation according to the tool number, the tool number is 1-24 |
OperateResult |
WriteCutterLengthWearOffset(int cutter,
double offset)
根据刀具号写入长度磨损补偿,刀具号为1-24
Write length wear compensation according to the tool number, the tool number is 1-24 |
OperateResult |
WriteCutterRadiusShapeOffset(int cutter,
double offset)
根据刀具号写入半径形状补偿,刀具号为1-24
Write radius shape compensation according to the tool number, the tool number is 1-24
|
OperateResult |
WriteCutterRadiusWearOffset(int cutter,
double offset)
根据刀具号写入半径磨损补偿,刀具号为1-24
Write radius wear compensation according to the tool number, the tool number is 1-24 |
OperateResult |
WriteProgramContent(String program,
int everyWriteSize)
[商业授权] 将指定文件的NC加工程序,下载到数控机床里,返回是否下载成功
[Authorization] Download the NC machining program of the specified file to the CNC machine tool, and return whether the download is successful 程序文件的内容必须%开始,%结束,下面是一个非常简单的例子: % O0006 G90G10L2P1 M30 % |
OperateResult |
WriteProgramContent(String program,
int everyWriteSize,
String path)
[商业授权] 将指定文件的NC加工程序,下载到数控机床里,返回是否下载成功
[Authorization] Download the NC machining program of the specified file to the CNC machine tool, and return whether the download is successful 程序文件的内容必须%开始,%结束,下面是一个非常简单的例子: % O0006 G90G10L2P1 M30 % |
OperateResult |
WriteProgramFile(String file)
[商业授权] 将指定文件的NC加工程序,下载到数控机床里,返回是否下载成功
[Authorization] Download the NC machining program of the specified file to the CNC machine tool, and return whether the download is successful 程序文件的内容必须%开始,%结束,下面是一个非常简单的例子: % O0006 G90G10L2P1 M30 % |
OperateResult |
WriteSystemMacroValue(int number,
double[] values)
写宏变量,需要指定地址及写入的数据
Write macro variable, need to specify the address and write data |
AccountCertificate, ConnectClose, ConnectServer, ConnectServer, ExtraAfterReadFromCoreServer, GetAvailableSocket, getByteTransform, getConnectionId, getConnectTimeOut, getIpAddress, getPort, getReceiveTimeOut, getSleepTime, IpAddressPing, PackCommandWithHeader, ReadFromCoreServer, ReadFromCoreServer, ReadFromCoreServer, setByteTransform, setConnectionId, setConnectTimeOut, setIpAddress, SetLoginAccount, SetPersistentConnection, setPort, setReceiveTimeOut, setSleepTime, UnpackResponseContentCheckRemoteToken, CloseSocket, CreateSocketAndConnect, CreateSocketAndConnect, CreateSocketAndConnect, ReadStream, Receive, Receive, Receive, ReceiveAndCheckBytes, ReceiveByMessage, ReceiveByMessage, ReceiveBytesContentFromSocket, ReceiveBytesContentFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveCommandLineFromSocket, ReceiveFrameWebSocketPayload, ReceiveHslMessage, ReceiveMqttMessage, ReceiveRedisCommand, ReceiveRedisCommandString, ReceiveStringArrayContentFromSocket, ReceiveStringArrayContentFromSocket, ReceiveStringContentFromSocket, ReceiveStringContentFromSocket, ReceiveWebSocketPayload, Send, Send, SendAccountAndCheckReceive, SendBaseAndCheckReceive, SendBytesAndCheckReceive, SendStreamToSocket, SendStringAndCheckReceive, SendStringAndCheckReceive, ThreadPoolCheckTimeOut, WriteStream, WriteStreamFromSocketpublic FanucSeries0i(String ipAddress, int port)
ipAddress - Ip地址信息port - 端口号protected INetMessage GetNewNetMessage()
NetworkDoubleBaseGetNewNetMessage 在类中 NetworkDoubleBasepublic Charset getTextEncoding()
public void setTextEncoding(Charset value)
value - 设置了新的值public short getOperatePath()
public void setOperatePath(short value)
value - 设置的新值protected OperateResult InitializationOnConnect(Socket socket)
NetworkDoubleBaseInitializationOnConnect 在类中 NetworkDoubleBasesocket - 网络套接字protected OperateResult ExtraOnDisconnect(Socket socket)
NetworkDoubleBaseExtraOnDisconnect 在类中 NetworkDoubleBasesocket - 网络套接字public OperateResultExTwo<Double,Double> ReadSpindleSpeedAndFeedRate()
public OperateResultExOne<FanucSysInfo> ReadSysInfo()
public OperateResultExOne<FileDirInfo[]> ReadAllDirectoryAndFile(String path)
path - 路径信息,例如 "//CNC_MEM/USER/"public OperateResultExOne<Integer> ReadAllDirectoryAndFileCount(String path)
path - 路径信息,例如 "//CNC_MEM/USER/"public OperateResultExTwo<String,Integer> ReadSystemProgramCurrent()
public OperateResultExOne<Short> ReadLanguage()
public OperateResultExOne<Double> ReadSystemMacroValue(int number)
number - 刀具号public OperateResultExOne<double[]> ReadSystemMacroValue(int number, int length)
number - 宏变量地址length - 读取的长度信息public OperateResult WriteSystemMacroValue(int number, double[] values)
number - 地址values - 数据值public OperateResult WriteCutterLengthShapeOffset(int cutter, double offset)
cutter - >刀具号,范围为1-24offset - 补偿值public OperateResult WriteCutterLengthWearOffset(int cutter, double offset)
cutter - 刀具号,范围为1-24offset - 补偿值public OperateResult WriteCutterRadiusShapeOffset(int cutter, double offset)
cutter - 刀具号,范围为1-24offset - 补偿值public OperateResult WriteCutterRadiusWearOffset(int cutter, double offset)
cutter - 刀具号,范围为1-24offset - 补偿值public OperateResultExOne<double[]> ReadFanucAxisLoad()
public OperateResultExOne<SysAllCoors> ReadSysAllCoors()
public OperateResultExOne<SysAlarm[]> ReadSystemAlarm()
public OperateResultExOne<Long> ReadTimeData(int timeType)
timeType - 读取的时间类型public OperateResultExOne<Integer> ReadAlarmStatus()
public OperateResultExOne<SysStatusInfo> ReadSysStatusInfo()
public OperateResultExOne<int[]> ReadProgramList()
public OperateResultExOne<CutterInfo[]> ReadCutterInfos(int cutterNumber)
cutterNumber - 刀具数量public OperateResultExOne<Integer> ReadCutterNumber()
public OperateResultExOne<byte[]> ReadRData(int start, int end)
start - 起始地址end - 结束地址public OperateResultExOne<double[]> ReadDeviceWorkPiecesSize()
public OperateResultExOne<String> ReadCurrentProgram()
public OperateResult SetCurrentProgram(short programNum)
programNum - 程序号信息public OperateResult StartProcessing()
public OperateResult WriteProgramFile(String file) throws IOException
file - 程序文件的路径IOException - 文件异常public OperateResult WriteProgramContent(String program, int everyWriteSize)
program - 程序内容everyWriteSize - 分割写入的长度信息public OperateResult WriteProgramContent(String program, int everyWriteSize, String path)
program - 程序内容everyWriteSize - 分割写入的长度信息path - 程序路径信息,默认为空,就是 //CNC_MEM/USER/PATH1/ 如果需要指定PATH2,需要输入 //CNC_MEM/USER/PATH2/public OperateResultExOne<String> ReadProgram(int program)
program - 程序号public OperateResultExOne<String> ReadProgram(int program, String path)
program - 程序号path - 程序路径信息,默认为空,就是 //CNC_MEM/USER/PATH1/ 如果需要指定PATH2,需要输入 //CNC_MEM/USER/PATH2/public OperateResult DeleteProgram(int program)
program - 程序号public OperateResultExOne<String> ReadCurrentForegroundDir()
public OperateResult SetDeviceProgsCurr(String programName)
programName - 程序名public OperateResultExOne<Date> ReadCurrentDateTime()
public OperateResultExOne<Integer> ReadCurrentProduceCount()
public OperateResultExOne<Integer> ReadExpectProduceCount()
public OperateResultExOne<FanucOperatorMessage[]> ReadOperatorMessage()
public String toString()
NetworkBasetoString 在类中 NetworkDoubleBaseCopyright © 2022. All rights reserved.