GetUnitInfo string garbled 4227/4224

Post your LabVIEW discussions here
Post Reply
BSI
Newbie
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

GetUnitInfo string garbled 4227/4224

Post by BSI »

Has anyone experienced garbled responses from the driver when GetUnitInfo is called? I am using a 4227, and few month ago a 4224 and the same thing happened, somewhat inconsistently.

Part of the strings in the response from the dll call appears garbled with funny characters... This is a problem, as I need to check the serial number and model of the device at start up...

Any insights, anyone?

Thx.

BSI

PS: I am using the last revision of the SDK: r10_1_0_17 and LabVIEW.

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: GetUnitInfo string garbled 4227/4224

Post by Chris »

What parameters do you have set in your ps4000GetUnitInfo function?

status numeric signed 16 bit int
handle numeric signed 16 bit int pass by value
infostring String C String Pointer minsize stringLength
stringLength numeric signed 16 bit int pass by value
reqsize numeric signed 16 bit int pass by Pointer to value
info numeric signed 16 bit int pass by value


Is the information ok if you check it using the PicoScope 6 application?
Help, About PicoScope 6?

BSI
Newbie
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

Re: GetUnitInfo string garbled 4227/4224

Post by BSI »

Hi Chris,

The behavior is not consistent. I verified the parameters and they are correct. Of note though, the Info enumerated type expects a U8, not a U16 in the version of the dll I am using. However, there is still a small red dot at the Call Library Function connector in LabVIEW indicating there is a type change for this input even though I apply a U8. Same thing with a U16...

Laurent

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: GetUnitInfo string garbled 4227/4224

Post by Chris »

Please try the example sent, to see if it works for you.

BSI
Newbie
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

Re: GetUnitInfo string garbled 4227/4224

Post by BSI »

What seemed to be the problem was the fact that I am using a LabVIEW ring or enum to pass data to the Info parameter. Even though the ring or enum is set to the right data type, it still creates occasional problem when passing the paramter.

If the iteration counter, or a straight number as opposed to a ring or enum is used, it seems to be ok.

Post Reply