Cant send commands to PM3 using C#. Please help me

Post questions and issues with Concept2 PM3 SDK
Post Reply
storynana
Paddler
Posts: 7
Joined: November 26th, 2010, 6:35 am

Cant send commands to PM3 using C#. Please help me

Post by storynana » December 2nd, 2010, 5:22 pm

Hi, there;
I am using VS2005(C#) to make a program which talk to PM4 (FW version: 26). Now I can find the PM4 device and init dll without program. But I cannot send command to PM4.
What I do here is:
[DllImport("PM3CSAFECP.DLL", EntryPoint = "?tkcmdsetCSAFE_command@@YAFGGQAKPAG0@Z", CallingConvention = CallingConvention.Cdecl)]
public static extern ushort tkcmdsetCSAFE_command(
ushort unit_address,
ushort cmd_data_size,
uint[] cmd_data,
ref ushort rsp_data_size,
uint[] rsp_data);

One command I tried is:
unit_address = 0;
cmd_data_size = 1;
cmd_data = { 0xA1};
rsp_data_size=244;

The error code I got is 65370, PM4 shows error: 384-46. I also tried some other data format, sometime times I got error on PM4 384-35 or 384-25

Can somebody help me out what I did wrong? What does these error mean? Where can I get a list of these errors.
I have been stuck on this for couple of weeks without any luck.

cheers

Post Reply