Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
read motor status from PCOMMSERVER
I am stuck at how to read the motor status. I am using VSE 2010 C# to develop a simple interface for my customer. I would like to seek for your advice regarding my problem. I am really stuck on how to read the motor status.

I am suing this method:


bool pSucces;

if (bDeviceOpen)
pmacdoc.GetNTMotorStatusEx(dwDevice, 1, ref t, out pSucces);

textBox1.Text = t.msnt_in_position_true.ToString();


What I want is I want to read the Position complete status and display it in textbox as 0 or 1.
The above program do compile but I can only read 0 all the time. I am really stuck at this.

I am new to C# and this might a minor problem. I am really thankful and appreciate if you guy could give some advice to solve this problem.
1. Check that you are passing/getting the structure reference and element properly.
2. Check on the success of the call.

Forum Jump:

Users browsing this thread: 1 Guest(s)