Input parameter setting when calling a DLL(Built from LabVIEW and a kind of VISA communication driver) in Teststand.
In labVIEW7.1 I wrote a COM port communications driver by using "VISA Write/Read". I put a string as the input of "VISA Write" and made it the input of the whole vi. Then I converted the vi into a DLL, which is called in Teststand3.1 by specifying DLL adapter. In "Edit C/C++ DLL Call" dialog, I pass a message of "60 6A 94 80 86 81" as the input parameter. My problem is I tried three kinds of methods to pass the message, see attached 1.jpg,2.jpg and 3.jpg. and found the first one sometimes doesn't work, the second work fine and the last doesn't work all time. I don't know why the first one and last one don't work well.
Thanks!
Jacky
Attachments:
31.jpg 38 KB
11.jpg 36 KB
21.jpg 49 KB
Hi Srinivas,
Just another note, I noticed that the Math Interface Toolkit version (MIT) 1.0 is not compatible with LabVIEW 7.1. You’ll need version 1.0.1. of the MIT toolkit in order for it to work with LabVIEW 7.1.
The LabVIEW 7.0 lvanlys.dll is also attached. I had to rename it with a .txt extension, so you’ll want to delete the extension.
Kileen
Attachments:
lvanlys.dll.txt 516 KB
Similar Messages
-
Error in Calling a dll built in labview from Matlab standalone
hello,
The problem I encountered is in the use of the math interface toolkit. I
created a dll which performs data fitting using a labview vi which i converted into a dll using the
math interface toolkit.
This dll is then called from a standalone matlab program. It works fine in the computer where I
create the matlab standalone program and labview dll. Howerver when i export to another
computer the matlab part runs fine but an error is reported when it tries to
call the labview created dll.
"One or more output arguments not assigned during call Parfit.dll"
The files related to this problem in the math interface toolkit (the labview vi, the corresponding dll and the matlab .m and .fig files and the standalone exe are in the attachment and named MathITproblem.zip
The matlab run time engine(for matlab 7) and labview runtime engine(ver 7.1) must be installed for this matlab file to run. the run time engines are downloadable from the web.
Does any one know the source of this error or encountered it before?
thanks
Attachments:
MathITproblem.zip 1263 KBHi Srinivas,
Just another note, I noticed that the Math Interface Toolkit version (MIT) 1.0 is not compatible with LabVIEW 7.1. You’ll need version 1.0.1. of the MIT toolkit in order for it to work with LabVIEW 7.1.
The LabVIEW 7.0 lvanlys.dll is also attached. I had to rename it with a .txt extension, so you’ll want to delete the extension.
Kileen
Attachments:
lvanlys.dll.txt 516 KB -
How can i call a DLL file from labview?
Iam using a sensoray 2601 module.It is given as DLL file(S2600.DLL).How can i call this function from LabVIEW?
Please Mark the solution as accepted if your problem is solved and donate kudoesAs far as I can tell problems might occur with the call library function node if the the DLL from visual basic is actually an ActiveX dll if that is the case it seems calling the dll by using the Invoke node is the way to go.
Have a look at this
/sletten -
When calling Excel 97 Macro from Labview 5.1, get error: cant find macro!
I have a macro written that I am trying to call from Labview. To assist in this task I downloaded an Excel Macro VI off the NI Websight. The VI came with an excel workbook that included a sample macro. I can run the example with no problems. I then modified the VI to fit what I am trying to do. I can get it to work with the Sample excel macro but not the one I created (I get an error saying it can't find the Macro). I have played with the timing and that has not worked. I have also noticed that when I use the sample Macro, it will work fine for a while then after a random number of executions, it will stop working and I will get the same error as with my Macro. In order to get it working ag
ain, I have to remove the sample worksheet (macro) and replace it with the original copy. I have been pulling my hair out for a couple of days now with this one so any help would be greatly appreciated!I am not sure what the problem could be. The VI you speak of can be found at the following link:
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/190d1f351297ef9a862567740073e2bc?OpenDocument
I ran the program for excel 2000 on my LabVIEW 6.1 about 50 times and did not get the error you reported. Your macro should not be corrupted with use. Have you considered reinstalling excel? I liked the idea about turning off multithreading. Do you see the same behavior if you run in high light execution mode?
Jeremy Braden
National Instruments -
FRM-40734 when calling external DLL Function from Forms 6
Even though some answers were given to my previous help request ("Again: Forms 6 and user-defined data types") I wasn't able to solve the problem of passing a parameter of an user-defined type to an external DLL function residing in the SECURSIGN.DLL library (the closest solution was to declare that "composite" parameter using the ROWTYPE clause referencing a custom-made table created just for the sake of defining that perticular datatype).
So I concentrated on SECURSIGN.DLL functions using more trivial data types, like a function requiring just four character strings as parameters.
I generated the necessary PL/SQL support using the FFI.
I discovered that also the simplest calls to external functions fail at runtime with the generic error FRM-40734.
I located the error: it happens just at the moment of calling the function from within the FFI-generated package body. Before that, the DLL is loaded with no problem, the function is correctly registered, and a function handle is regularly returned.
As long as I can regularly issue the very same call with the very same parameters from Visual Basic, I can't understand what's going wrong (ALL the needed DLL are in the same directory as the FMB/FMX forms).
I will greatly appreciate any help that You may be able to provide.I have noticed just now that a dump file having a name like ifrun60_dump_299, is generated by FORMS every time I issue the aborted call to the foreign function.
Inside the form dump file, apart from useless info like Registers and so on, the message:
"Could not find Module32First"
By a FILE/FIND/CONTAINING TEXT I searched all the DLLs, and I noticed that Module32First is a routine that can be found within each of the following DLLs:
Cl32
d2kwut32
d2kwut60
I tried to load those DLLs along with SECURSIGN.DLL by modifying the PROCEDURE LoadLibrary into the FFI-generated PLL code, and I have apparently no problem in loading all the DLLs that I wish, but the error persists, and that dump file is constantly generated, always looking for the "Module32First" routine.
How can I avoid all that mess and the FRM-40734 error?? -
Application crashes when calling DLL built with LabVIEW 2011
Hello everybody,
Our application calls DLLs built with LabVIEW 2010 SP1. We installed LabVIEW 2011 and built some DLLs. So far so good. If we start our application and run 2010 DLLs it still works fine. If we run a 2011 DLL just once no error happens, but if we try to run the same 2011 DLL our application crashes reporting the error below. I saved the code for 2010 version and built a DLL and it works fine. Does anyone know why?
Thank you in advance.
#Date: Fr, 16. Sep 2011 16:25:25
#OSName: Microsoft Windows XP Service Pack 3
#OSVers: 5.1
#OSBuild: 2600
#AppName: PasTA
#Version: 11.0f2 32-bit
#AppKind: AppLib
#LabVIEW Base Address: 0x30000000
16.09.2011 16:25:26.181
Crash 0x0: Crash caught by NIER
File Unknown(0) : Crash: Crash caught by NIER
minidump id: 8a779b3f-51d7-4864-8e4d-6ab0195cd158
ExceptionCode: 0xC0000005
N
0x3072C804 - lvrt <unknown> + 0
0x3072CBB8 - lvrt <unknown> + 0
0x7C864191 - KERNEL32 <unknown> + 0
0x7C83AB50 - KERNEL32 <unknown> + 0
0x00000000 - PasTA <unknown> + 0
Attachments:
error.PNG 11 KBOn that note, you should be able to create DLLs in 2010 and run them with 2011, correct?? In my case, I have a 2010 built DLL (talking to sbRIO), most of the functions work when run in 2011, but a couple of them lock up LabVIEW on the desktop (but not the sbRIO), no lock ups happen with 2010 on the desktop.
-
Alternatives to long parameter lists when calling methods
I've heard you shouldn't have more than 3 parameters when calling methods. What are the alternatives to long parameter lists when calling methods? Compounding parameters into new inner classes, declaring them as member fields? Which one is preferable?
Okay, I get it. But since it's late in the day, I'll share my additional wandering thoughts. And I'll just go ahead and preemptively slap myself for doing so. Ouch! There. So the rules are more like this:
1) Only use setters if the values in question are meant to be part of the state of an object.
2) In general, don't let external entities directly set the state of an object.
Which can be combined into:
1) In general, never use setters.
Which could be reworded to:
1) Only use setters in non-general situations.
Or:
1) Only use setters when setters are a good solution...which isn't very often...generally speaking...
Or if I were to infer when it's a good solution:
1) Only use a setter when it is useful to the caller and has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class...generally speaking...
Actually, you might just infer from here forward that the "generally speaking" is implicit to every rule, and is essentially the "There is an exception to every rule" rule. Which is an interesting rule because it can be applied to itself, resulting in a paradox...generally speaking...but I digress.
And then translated back to the original topic:
1) You can use a setter instead of a constructor argument so long as the value isn't needed at time of construction (or a default value will suffice) and it is useful for the caller to be able to use the setter and using the setter has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class.
But this won't quite cut it either. With the input of others, we could eventually devise a very concise rule, but it will end up being so long that on one will ever read it...making it an ideal candidate to be included in a legal document. Which will eventually find it's way into a very long scroll pane with a check box at the end exclaiming that you read the document, at which you will not be able to continue unless you check the check box...at which point, what do you do? After all, you are not a liar...generally speaking...
In summary, you could potentially use setters in some limited cases, but in the general sense, that's more of an option than a recommendation. :-) -
LabVIEW crashes when calling a dll
I am trying to call a dll through my LabVIEW program. The dll implements a routine to access an ftp server. When the server is found, everything works as expected. However, if there is a delay in finding the server, LabVIEW throws an error � �An exception occured within the external code called by the Call Library Node�. The detailed error message is attached here.
The dll function times out after 25 seconds if the server is not found (it returns a signed integer). This error message pops up after roughly 20 seconds.
The dll was created in VC++ 6.0. It uses standard MFC calls.
Any information about why this could be happening will be appreciated.
Thanks.
Attachments:
LabVIEW_error.jpg 14 KBHi,
If you call a dll, everything should be just right, or it will crash (if you
use LV7, you're lucky, most of the times LV stays alive, and only gives a
message).
The first thing that should be checked is the calling convention. This
should probably be "stdcall (API)". This changes the way the parameters and
return address are pushed to the stack.
The second point are the parameters. Pointers should be set to pointers,
LONG to i32 etc. The return parameter can always be set to i32, or to
nothing.
My best guess is (since the dll crashes after a while), there should be a
pointer to a buffer (most likely a cluster, but could be a reference). The
connection succeeds, and the dll copies the information to the pointer. If
the pointer is not valid (the memory does
not belong to LabVIEW), an
exception is raised.
Perhaps you can give a function prototype? The prototype is the way to
start.
Regards,
Wiebe.
"gopinath" wrote in message
news:[email protected]..
I am trying to call a dll through my LabVIEW program. The dll
implements a routine to access an ftp server. When the server is
found, everything works as expected. However, if there is a delay in
finding the server, LabVIEW throws an error - "An exception occured
within the external code called by the Call Library Node". The
detailed error message is attached here.
The dll function times out after 25 seconds if the server is not found
(it returns a signed integer). This error message pops up after
roughly 20 seconds.
The dll was created in VC++ 6.0. It uses standard MFC calls.
Any information about why this could be happening will be appreciated.
Thanks. -
Array limitation when calling VB Dll?
Today I encountered a problem when calling a Visual Basic DLL in Labview 8.2.1
I had to pass a 3D Array, with one dimension exceeding 30 000. around that array size I ended up with error -2146828282 when calling the Dll.
The dll was working fine for weeks. So, is there any limition to the array size, which could cause the error?Hi sthu,
Having 30,000 elements in one dimension of an array should not cause any problems by itself. The maximum number of elements per dimension in an array is (2^31) – 1 as described in the LabVIEW Help for Grouping Data with Arrays and Clusters. However, this is also dependent upon the memory available in your computer. If there is not enough memory available in RAM, you might receive an error when passing the array to the DLL.
I have included a couple links to pages that discuss LabVIEW memory usage and managing large data sets in LabVIEW. These might help get your application up and running with the larger array sizes.
VI Memory Usage
Managing Large Data Sets in LabVIEW
Donovan -
Calling other dll's from extension
Hello, i'm currently in the process of creating a source
control extension. The source control server comes with a set of
.net DLL's already created that allow easy access to check things
in out and out of the server.
How would i go about calling those dll's from a C dll
extension? I've read somewhere about loadlibrary, does that within
C and dreamweaver?
Any help is appreciated!
Thanks,
PaulNo.
-
Error ITS_TEMPLATE_NOT_FOUND when calling a function code from the web
Hi Experts,
I have craeted a simple module pool program and a service for the same in SICF. The module pool has only one screen where I am giving the input to the two fieds
1. year 2. category. when I click on FIND button the result will appear on the same screen. The result will be the winner and the nominees for that year. The program is running perfect when I execute the transaction in R/3.
The coding in the PAI of the module pool is as follows:
*& Module Pool ZYMOVIE1
INCLUDE ZYMOVIE1TOP . " global Data
INCLUDE ZYMOVIE1O01 . " PBO-Modules
INCLUDE ZYMOVIE1I01 . " PAI-Modules
INCLUDE ZYMOVIE1F01 . " FORM-Routines
tables : ymovie.
DATA: OKCODE like sy-ucomm.
tables: ztext.
*& Module GET_RECORD INPUT
text
MODULE GET_RECORD INPUT.
case okcode.
when 'FIND'.
SELECT SINGLE * FROM YMOVIE
WHERE YYEAR = YMOVIE-YYEAR
AND CATEGORY = YMOVIE-CATEGORY.
endcase.
ENDMODULE. " GET_RECORD INPUT
I have created a Internet service ZYMOVIE1 ans created a template for screen 9000
The HTML code is as follows:
`include(~service="bbpglobal", ~name="bbpfunctions.html")`
<html>
<head>
<title>`~windowtitle`</title>
</head>
<body>
`~messageline`
<form name="formFind" action=”`wgateUrl()`” method="POST">
year : <input type = "text" name = "`YMOVIE-YYEAR`"/>
category : <input type = "text" name = "`YMOVIE-CATEGORY`"/>
<INPUT TYPE="hidden" name="~okcode" value="FIND">
<INPUT TYPE="submit" name="btnSubmit" value="FIND">
<input type = "text" name = "YMOVIE-WINNER" value= "`YMOVIE-WINNER`" size = "`YMOVIE-WINNER.maxsize`"/>
<input type = "text" name = "YMOVIE-NOMINEE1" value= "`YMOVIE-NOMINEE1`" size = "`YMOVIE-NOMINEE1.maxsize`"/>
<input type = "text" name = "YMOVIE-NOMINEE2" value= "`YMOVIE-NOMINEE2`" size = "`YMOVIE-NOMINEE2.maxsize`"/>
<input type = "text" name = "YMOVIE-NOMINEE3" value= "`YMOVIE-NOMINEE3`" size = "`YMOVIE-NOMINEE3.maxsize`"/>
</form>
</body>
</html>
when i click on the FIND button in the web I am getting a dump "ITS_TEMPLATE_NOT_FOUND".
Please suggest me where I am doing wrong. Also is there any way i can add attachemtns in SDN. It is very difficult to write everything here and how to use the "code" button when i create a new thread in SDN?/
thanks
sankarhi
yes i got some entries in SM50 with w at the left
A Error Code ITS_TEMPLATE_NOT_FOUND.
W *** ERROR => diag: Template for modulepool ZYMOVIE1, dynpro number 9000, service zymovie1 is not found and GenerateDynpro fla
W *** ERROR => plugin: XKrnHandleResponse failed rc= -25 [itspxkrn.cpp 764]
W *** ERROR => plugin: ItspXKrn_HandleResponse failed. 0x2b96feff78 rc: 0 [itspxkrn.cpp 391]
W *** ERROR => ipl_ConvertOut failed rc = 1, send icf error page [itsplxx.c 1551]
let me know if you need any other information
thanks
sankar -
I need to call a batch file from java and pass arguments to that Batch file
Hi,
I need to call a batch file from java and pass arguments to that Batch file.
For example say: The batch file(test.bat) contains this command: mkdir
I need to pass the name of the directory to the batch file as an argument from My Java program.
Runtime.getRuntime().exec("cmd /c start test.bat");
How to pass argument to the .bat file from Java now ?
regards,
Krish
Edited by: Krish4Java on Oct 17, 2007 2:47 PMHi Turing,
I am able to pass the argument directly but unable to pass as a String.
For example:
Runtime.getRuntime().exec("cmd /c start test.bat sample ");
When I pass it as a value sample, I am able to receive this value sample in the batch file. Do you know how to pass a String ?
String s1="sample";
Runtime.getRuntime().exec("cmd /c start test.bat s1 ");
s1 gets passed here instead of value sample to the batch file.
Pls let me know if you have a solution.
Thanks,
Krish -
When trying to update apps from iPad and iPhone a previous one time users email keeps coming up. How do I delete their information?
delete off any apps that are asking for the wrong apple id and download/sync them over from the correct one
-
somehow changed a video in my imovie to zero fps, so it just plays black. The video still exists on my desktop but even when I delete the files from imovie and reimport them the file is still in zero fps and play black.
I'm not sure of your question.
Are you asking how to use Photoshop?
Or are you asking for the dimensions of video iMovie uses?
It edits in 720P HD, which is 1280x720.
You can make it a bit bigger so you can zoom in.
Much bigger then this is a waste of time. -
the 2, the AN asked to right click the Invoke Node(this is step9) and choose initialize. However there is no intialize option on the pop up menu. Anything am I doing wrong? I am using Labview6 and I did add the "enableCustomInterface=True" in the INI-fileThank you for your help.
T Tallthe 2, the AN asked to right click the Invoke Node(this is step9) and choose initialize. However there is no intialize option on the pop up menu. Anything am I doing wrong? I am using Labview6 and I did add the "enableCustomInterface=True" in the INI-fileT Tall,
What's the number of the application note "Calling IVI-COM drivers from LabVIEW"? I'm unable to find what you're looking at.
Thanks,
--Bankim
Maybe you are looking for
-
I don't have a security question and each time I try to make purchase the security question comes up. Please I need a way out of this issue as soon as possible thank you. <E-mail Edited by Host>
-
Simultaneous Mail and iCal problems - iCal shows old to-dos
I was getting ready for my weekly backup, so I ran all the cleaning activities in OnyX. Then when I logged in after the restart, Quicksilver crashed on me 3 times in a row and acted as if I was installing it for the first time. I did not, however, ha
-
Hello, I have a text file and each line contains random text followed by an IP address as follows. some text....172.30.25.30 some text.....172.30.85.10 some text..172.30.25.35 some text.......172.30.85.11 some text....172.30.15.1 some text...172.30.1
-
HT1338 How do I create a group in my contacts
There is no place in my contacts nor in my email to create a group.
-
Call of duty advanced warfare xbox one in store pre order
I dont have a card at the moment but I would still like to pre order the console so I was wondering if i can pre order it in store Solved! Go to Solution.