Search found 5 matches

by MarkD
February 13th, 2015, 2:32 pm
Forum: SDK Questions
Topic: Visual Basic development
Replies: 8
Views: 12707

Re: Visual Basic development

Make sure you are handling byref and byval parameters correctly. My suspicion is that, because the example you were given was a byval parameter, then you may have declared all of them byval. Return parameters need to be implicitly (e.g an array) or explicitly (e.g. a ushort) declared as byref. Here ...
by MarkD
February 12th, 2015, 7:06 pm
Forum: SDK Questions
Topic: PM3 - 161 error
Replies: 2
Views: 5496

Re: PM3 - 161 error

ok, I finally fixed this. It turns out that the csafe DLL isn't quite thread-safe. The fix was to lock the entry to CSafe_Command. Here is some C# below if you need it. The wrapper code allows one thread at a time to enter the ...command() function. Obviously, best to set the protocol_init(timeout) ...
by MarkD
February 8th, 2015, 3:55 am
Forum: SDK Questions
Topic: PM3 - 161 error
Replies: 2
Views: 5496

Re: PM3 - 161 error

An update - I set the protocol timeout to be tighter than default (now 200ms, was 1000ms). This may have proved that the two errors (161 and USB Read Timeout) are related as the time between the 161 error and the read-timeout error follows the timeout I just set. 161 is checksum error. I am only eve...
by MarkD
February 5th, 2015, 4:47 pm
Forum: SDK Questions
Topic: PM3 - 161 error
Replies: 2
Views: 5496

PM3 - 161 error

Hi, When interfacing with the PM3, I occasionally get a 161 code on the screen and a read timeout return code. These occur at different times. I have built an erg simulator which drives the input to two PMs with exactly the same signal. Each PM may or may not give a 161 error anything from 2 minutes...
by MarkD
December 7th, 2014, 8:15 pm
Forum: SDK Questions
Topic: Multiple Ergs on one computer
Replies: 3
Views: 8141

Re: Multiple Ergs on one computer

Old thread but relevant. Are the CSAFE calls re-entrant? if a previous docmd call has not completed, can I call docmd on another thread? At the device level these will be routed to separate USB devices so I am hoping that CSAFE / DDI layers don't use any static / shared data. I am trying to test it ...