I post a lot of questions about - how to pull variable value from the module with C#. And I still didn’t receive a clear answer. A lot of members of this forum point me in the right direction - thank you all for your examples and support.
I was able to pull a variable from my module but I can not pull the value of that variable. My code:
private NetworkScanner netScan = null;
private ControllerInfo ctrlInfo = null;
private Controller aController = null;
// scanning the network for the controllers
NetworkScanner netScan = new NetworkScanner();
// getting all available controllers from the network
// using ControllerInfo ctrlInfo
ctrlInfo = netScan.GetControllers();
// can be used like this if you know which controller inside of ctrlInfo array.
// using Controller aController
aController = new Controller(ctrlInfo[0]);
//aController = ControllerFactory.CreateFrom(ctrlInfo[0]);
RapidData rd = aController.Rapid.GetRapidData(“T_ROB1”, “mModule”, “variable”);
//trying to print the value:
Console.WriteLine(rd.Value);
No output - empty space.
What I’m doing wrong?