Test and Measurement Forum

GetUnitInfo string garbled 4227/4224

Post your LabVIEW discussions here

GetUnitInfo string garbled 4227/4224

Postby BSI » Thu Mar 31, 2011 5:45 am

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.
BSI
Newbie
 
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

Re: GetUnitInfo string garbled 4227/4224

Postby Chris » Thu Mar 31, 2011 1:59 pm

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?
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: GetUnitInfo string garbled 4227/4224

Postby BSI » Tue Apr 05, 2011 1:48 am

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
BSI
Newbie
 
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

Re: GetUnitInfo string garbled 4227/4224

Postby Chris » Thu Apr 07, 2011 9:02 am

Please try the example sent, to see if it works for you.
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: GetUnitInfo string garbled 4227/4224

Postby BSI » Mon Apr 11, 2011 1:30 am

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.
BSI
Newbie
 
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 0 guests