CNC - Rdmacroinfo: / Read Custom Macro Variable Information
CNC - Rdmacroinfo: / Read Custom Macro Variable Information
声明
/* read custom macro variable information */
[DllImport("FWLIB32.dll", EntryPoint = "cnc_rdmacroinfo")]
public static extern short cnc_rdmacroinfo(ushort FlibHndl, [Out,
MarshalAs(UnmanagedType.LPStruct)] ODBMVINF a);
描述
读宏变量信息。
参数
(1)FlibHndl 库句柄;[ in ]
(2)mvinf [ out ]
/* cnc_rdmacroinfo:read custom macro variable information */
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public class ODBMVINF
{
public short use_no1;
public short use_no2;
}
use_no1
use_no2
Series 15
1 : 100,..,199, 500,..,599
2 : 100,..,199, 500,..,699
3 : 100,..,199, 500,..,999
TT 0 : 100,..,149, 500,..,524
1 : 100,..,149, 500,..,549
2 : 100,..,149, 500,..,599
3 : 100,..,149, 500,..,749
Series 15i
3 : 100,..,199, 500,..,999
4 : 100,..,199, 200,..,999
0 : 100,..,149, 500,..,531
1 : 100,..,199, 500,..,999
2 : 100,..,199, 500,..,599
Series 16i/18i-W
0 : 100,..,149, 500,..,531
1 : 100,..,314, 500,..,699
2 : 100,..,149, 500,..,699
3 : 100,..,314, 500,..,531
4 : 100,..,149, 500,..,999
5 : 100,..,314, 500,..,999
Power Mate i
0 : 100,..,149, 500,..,531
1 : 100,..,199, 500,..,999
2 : 100,..,199, 500,..,699
0 : 100,..,149, 500,..,549
1 : 100,..,199, 500,..,999
3 : 100,..,499, 500,..,999
函数返回值
函数运行正常返回 EW_OK。
Return code Meaning/Error handling
EW_NOOPT No option
(6) This function needs the custom macro option.
代码
class Program
{
static void Main(string[] args)
{
ushort Flibhndl = 0;
// 获取库句柄 ( Ethernet )
ret = Focas1.cnc_allclibhndl3("192.168.0.224", 8193, 10, out
Flibhndl);
if (ret != Focas1.EW_OK)
{
Console.WriteLine("发生异常,请检查!");
return;
}
#region cnc_rdmacroinfo