Hello,
I’m making a new application for my industry.
The purpose is to control the robot by an external application.
The robot act like a server and the application is the client.
Now, I’m at the begining, but the communication is not working.
In the ursim, I have this code in the BeforeStart program :
def beforeProgram():
ipAddress = “192.168.56.1”
portNumber = 136
signalName = “Communication”
modbus_add_signal(ipAddress, 255, portNumber, 0, signalName)
end
And in my application (in C#), I have that :
client = new ModbusClient(192.168.56.1, 136);
client.Connect();
I have try multiplical tries, but that does’nt work…
I have check already check that my virtual machin alow ursim to create a server
Anyone could help me ?
Hi @thierry.beboux,
Welcome to the UR community forum!
This topic might be helpful to you. And reading this article is also worth reading.
Best regards
Ebbe
HI @Ebbe,
Thanks for your answer.
Now, my server is created. But I can’t reach the good address.
In first time, I try to read the input in address 0 (like documentation says) or the analog output (address 16).
Code: modbus_add_signal(“192.168.56.101”, 255, 0, 0, “Communication”)
In ursim, I try to toggle the input in simulation mode, but I can’t see any change in my application. I think that I don’t have the good address, but I don’t know where to look…
Have you more informations to help me again ?
Best regards
Hi @thierry.beboux,
I am not quite sure where you are having your issues and where your C# application is running?
As I stated here, it is a nice exercise from URScript to connect to local host on “127.0.0.1”:
Ebbe
Thanks for your answers.
I have found my probleme and solved id
But I still have a question. I can read and write the registers output and read the input.
Is there a possibility to write/read a register that is note connected to a physically port ?
For example : I want to send to the robot a start command, but I can’t make it without a physically output.
Can I send an information purely virtual ?
Béboux
Address 128-255 is general purpose register that you can use for that purpose.
Ebbe
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.