Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Activate camera in station

#5
(07-15-2021, 07:25 PM)Vineet Wrote:Hello,

Here is the code I tried and it works fine. Can you try this?

Code:
using System;

namespace SimpleNetcoreApplication
{
public class Program
{
static void Main(string[] args)
{
var rdk = new RoboDK();

// Connect to existing RoboDK or start a new one if RoboDK is not running
var status = rdk.Connect();
Console.WriteLine($"Connect status: {status}");

//RoboDK _RDK = new RoboDK();
抢劫oDK.Item camera = rdk.getItem("Camera 1");
camera.setParam("Open");

// close RoboDK
//rdk.CloseRoboDK();

}
}
}
Hope this helps you.

I inserted the code into the function and executed it.
"Connect status: True" is printed to the Console, and then the program crashes.

///
/// Send a specific parameter to RoboDK. This is reserved for internal purposes.
///

/// Item parameter
/// value
///
public string setParam(string param, string value = "")
{
link._require_build(7129);
link._check_connection();
link._send_Line("ICMD");
link._send_Item(this);
link._send_Line(param);
link._send_Line(value);
string response = link._recv_Line(); <<< Crash Happens Here
link._check_status();
return response;
}

It appears to crash while waiting for a response from the RDK window.
I'm curious if I am using an old version of the API code.


Messages In This Thread
Activate camera in station - byAlec.Zitzelberger- 07-14-2021, 09:05 PM
RE: Activate Camera in Station - byVineet- 07-15-2021, 01:23 PM
RE: Activate Camera in Station - byVineet——07-15-2021 07:25点
RE: Activate Camera in Station - byAlec.Zitzelberger- 07-15-2021, 07:39 PM



Users browsing this thread:
1 Guest(s)