From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can labview call a test stand module

Solved!
Go to solution

Having problems with a test dll that runs in test stand, but I get errors when trying to use the wizard in labview, however I can use the call library function node to protypye it.  Problem - the function openComserialPort(char* comPort, ErrStruct & err), how do you difine the parameters for the ErrStruct & err part.

next Question, since this Dll runs in Test Stand, is their anyway to export to work in LabVIEW. 

0 Kudos
Message 1 of 9
(3,383 Views)
Solution
Accepted by topic author hallawt2004

since this Dll runs in Test Stand, is their anyway to export to work in LabVIEW. 

Yes it will work in LabVIEW sure. 

 


how do you difine the parameters for the ErrStruct & err part.


It is a "Pointer to a structure". You have to tell the structure of ErrStruct. Please attach the description of that dll for help you better.

0 Kudos
Message 2 of 9
(3,361 Views)
This looks to me like are controlling a serial instrument in Labview with some DLL function given to you by the vendor. Have you done a search on the internett for Labview drivers for this instrument. If not perhaps you can write your own simple driver. You may be strugling for weeks with these DLL functions, but to implement a simple driver in labview may take only a day


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 9
(3,349 Views)

No i'm communicating to a circuit board's microprocessor used to contrill a radio circuit.  It uses a RS232 port (standard UART), to program in with serial number and other information.  the DLL works with Test Stand, however, The customer does not have LabVIEW, and has never worked with it.  shared library wizard does not configure the function calls, however the call library function node does.  found answer for the errstruct, as I thought it was in defining the parameters.   Name:  err   Type:  Adapt to Type  Data format:  Pointers to handle.  Input is wired to a custer containing the data types of the structure.  Next goal is prototyping the following statement: 

int_stdcall GetStdTable1(int & hwVersion, int & hwRevision, int & fwVersion, int & fwCompatiblility, char * serialNumber, char * manufacturer, char * model, ErrStruct & err);

0 Kudos
Message 4 of 9
(3,303 Views)

Hai hallawt,

 

Thanks for sharing.


Next goal is prototyping the following statement: 

int_stdcall GetStdTable1(int & hwVersion, int & hwRevision, int & fwVersion, int & fwCompatiblility, char * serialNumber, char * manufacturer, char * model, ErrStruct & err);


 

Have you achieved this goal? Since you have constructed the ErrStruct, hope it will be easier. Post if you have any problems. Always there to help you. Smiley Happy

0 Kudos
Message 5 of 9
(3,286 Views)

Here's a description of the dll, to start off, I have a circuit board with a microprocessor on it, that has control for a radio module.  During test I need to program this board serially through its' TX and RX lines on the processor.  The dll given to me, which was written for test stand, has functions to enable me to do this programming.  There are basically  11 function contained is this Dll. 

Initialize Dll, (no errors),

open serial port, (no errors), 

getStandardTable, which sends a command for the microprocessor to send back its information-> get assertion error

WriteHardwareVersion -> Sends the version and revision number -> assertion error.

ColdStart -> Which resets board statistics variables -> assertion error.  Now, this function prototype is ColdStart (errStruct & err); So I prototype like I did for the above error struct, but still got an assertion error, which leaves me to believe, that , or vendor, has a bug communicating, or sending the commands via serially, to test this, I could use the serial examples contained in LabVIEW, however I don't know the command set of the microprocessor, or could there be something else wrong,  Any ideas will be appreciated.

0 Kudos
Message 6 of 9
(3,259 Views)

Hello hallawt,

 

You might be on the right track with believing that the problem lies in the dll itself. What did you mean by 'assertion error'? Was there a specific error number and message associated with this? 

Vivek Nath
National Instruments
Applications Engineer

Machine Vision
0 Kudos
Message 7 of 9
(3,232 Views)
his is the exact error statement that appears before LabVIEW crashes:

(Microsoft Visual C++ Debug Library)

Debug Assertion Failed

Program: C:\Program Files\National Instruments\LabVIEW 8.6\LabVIEW.exe

File:F:\RTM\vctools\crt_bld\SELF_X86\crt\scr\tcsncpy_s.inl

Line:  24

 

Expression:  ((_Dst)) !=NULL &&((_SizeInBytes)) > 0

Not able to find a solution on running this Dll in LabVIEW, have installed Test Stand, and using that module, TEST Stand did not recognize the functions.
0 Kudos
Message 8 of 9
(3,210 Views)

 Pass by reference, is something that test stand does and labview doesn't do very well.  Got the original DLL file that written to be used with test stand, and compared it with the function prototype that labview created, and they were different.  Anytime a function prototype uses "&" sign, its a pass by reference, and also found that LabVIEW, doesn't handle structures very well.   Its a Type Def, which the test executive recognized.  So the solution was to run the test using test stand as the test executive, but call my LabVIEW module that check voltages, current and other things, but the communication to the microprocessor using the dll is handle within test stand.  Thank-You all who reply, there's some that may not know, but this may come in handy some day. 

 

0 Kudos
Message 9 of 9
(3,160 Views)