0

我在 DolphinDB 中使用 OPC DA 插件。我在 MatrikonOPC Server 中创建标签像这样。在 dolphindb GUI 中,我将代码编程如下,

loadPlugin("D:/OPCdev/PluginOPC.txt")

OPC::connectOpcServer(`127.0.0.1,`Matrikon.OPC.Simulation.1)

t1 = table(200:0,`time`quality`value, [DATETIME, INT, INT])
t2 = table(200:0,`time`quality`value, [DATETIME, INT, INT])
t3 = table(200:0,`time`quality`value, [DATETIME, INT, INT])
t4 = table(200:0,`time`quality`value, [DATETIME, INT, STRING])
t5 = table(200:0,`time`quality`value, [DATETIME, INT, DOUBLE])
t6 = table(200:0,`time`quality`value, [DATETIME, INT, DOUBLE])
t7 = table(200:0,`time`quality`value, [DATETIME, INT, BOOL])
t8 = table(200:0,`time`quality`value, [DATETIME, INT, DATETIME])
t9 = table(200:0,`time`quality`value, [DATETIME, INT, DOUBLE])

def callback1(mutable t1, d) {
    t1.append!(d)
}

def suba(tag, callback) {
    cid = OPC::connectOpcServer(`127.0.0.1,`Matrikon.OPC.Simulation.1)
    print("mycid:" + cid);
    OPC::subscribeTag(cid,tag, callback,10)
}
submitJob("i1", "subtestInt1" , suba, ".testINT1", callback1{t1})
submitJob("i2", "subtestInt2" , suba, ".testINT2", callback1{t2})
submitJob("i3", "subtestInt4" , suba, ".testINT4", callback1{t3})
submitJob("i4", "subtestString" , suba, ".testString", callback1{t4})
submitJob("i5", "subtestReal4" , suba, ".testReal4", callback1{t5})
submitJob("i6", "subtestReal8" , suba, ".testReal8", callback1{t6})
submitJob("i7", "subtestBool" , suba, ".testBool", callback1{t7})
submitJob("i8", "subtestTime" , suba, ".testTime", callback1{t8})
submitJob("i9", "subtestMoney" , suba, ".testMoney", callback1{t9})

getRecentJobs()

运行代码,结果显示 像这样 我的问题是为什么最后一个作业没有开始?

4

1 回答 1

0

在 DolphinDB 中,该参数maxBatchJobWorker决定了一个数据节点可以同时运行的并发批处理作业的数量。默认值与参数相同workerNum。如果你真的想同时运行更多的批处理作业,请设置参数maxBatchJobWorker

于 2019-07-29T14:11:27.343 回答