LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN signal Cycle data on and off

Hi, 

I am using C ++ dll wrapping in C #.

 

The CAN module uses the USB-8502.

 

I created a session. and I started Session.

 

If I write Some signal to the some equipment, In some CANDB turns signal to cycle. however, another CANDB sends signal only once.

 

Why is the behavior different for each CANDB?

 

※  I created a session using the function as follow.

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

[DllImport(DLL_NAME, EntryPoint = "nxCreateSession", CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 nxCreateSession(
string DatabaseName,
string ClusterName,
string List,
string Interface,
UInt32 Mode,
out IntPtr SessionRef);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

and I started a session using the function as follow.

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

[DllImport(DLL_NAME, EntryPoint = "nxStart", CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 nxStart(IntPtr SessionRef, UInt32 Scope);

/**
nxStatus_t _NXFUNC nxStart(
nxSessionRef_t SessionRef,
u32 Scope);
**/

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

and I wrote a signal using the function as follow.

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

[DllImport(DLL_NAME, EntryPoint = "nxWriteFrame", CallingConvention = CallingConvention.Cdecl)]
public static extern Int32 nxWriteFrame(IntPtr SessionRef, [MarshalAs(UnmanagedType.AsAny)] object Buffer, UInt32 NumberOfBytesForFrames, long Timeout);

//nxStatus_t _NXFUNC nxWriteFrame(
// nxSessionRef_t SessionRef,
// void* Buffer,
// u32 NumberOfBytesForFrames,
// f64 Timeout);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

thanks.

0 Kudos
Message 1 of 2
(144 Views)

Does the issue happen on both CAN ports, or only one? 

0 Kudos
Message 2 of 2
(50 Views)