I implemented a program that communicates through Tool I/O.
Installation Node :
Implemented the serial communication daemon using /dev/ttyTool
port by refferring to the mydaemonswing
example.
public void generateScript(ScriptWriter writer) {
writer.assign(XMLRPC_VARIABLE, "rpc_factory(\"xmlrpc\", \"http://127.0.0.1:" + PORT + "/RPC2\")");
writer.appendLine(XMLRPC_VARIABLE + ".set_data(1)");
}
Go to Installation > General > Tool IO and set Tool Analog Inputs
to Communications Interface
.
However, when I run the program, an error occurs in the script on the installation node.
Popup Title: An error occurred in the running program
XMLRPC: Failed with error code 1: <class ‘termios.error’>:(5, ‘Input/output error’)
Installation node: SOMETHING
URCap: XXXXX
OK / Go to program Button
^Advanced view(script) ------------------------------
Script Code
Error position: line24, column 3
...
# begin: URCap Installation Node
# Source: XXXX
# Type: SOMETHING
mydaemon = rpc_factory("xmlrpc", "http://127.0.0.1:40405/RPC2")
mydaemon.set_data(1) <- Error Here
# end: URCap Installation Node
while (True):
...
I think it seems to be a problem with port access permissions.
But I don’t know what did I do wrong…
In fact, if it fails to open the port, the daemon fails to run, but the daemon is running well.