ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
04-11-2013 01:18 AM
Hi!
I have an old working .Vi that is interfaceing with an old Philps industrial scale. It returns the weigt and displays this in a numeric "box". I now try to make use of this in a new VB.Net application that I´m working on but I could really need some help.
Image of theblock diagram:
The value is returned as a double "Aktuell vikt" and displayed in the text box and on the "tank".
I have set up my project build like this:
The full Method property, not showing completely in the pic, is this:
<Void>
<Name>returnvalue</Name>
</Void>
Main()
I have tried to follow the tutorials that I could find on the forum for this, but without success..
This is my test calss in VB.net
Imports
NationalInstruments.LabVIEW.Interop
Imports
InteropAssembly.LabVIEWExports
Public
Class Form1
DeclareSub Main Lib"PhilipsPR1602.dll" (ByRef returnObject AsObject)
PrivateSub Button1_Click(sender AsObject, e AsEventArgs) HandlesButton1.Click
Dim value AsObject = Nothing
Main(value)
EndSub
End
Class
My guess it that this:
DeclareSub Main Lib"PhilipsPR1602.dll" (ByRef returnObject AsObject)
, is where I go wrong. Not really sure what I´m doing here right now so would appreciate all the help I can get!
The goal is to get hold of the "aktuell vikt" (i.e current weight) value in the vb applicaiton, and have that to act as a datasource for a tank control in measurment studio 2013.
BR /Fredrik
04-11-2013 01:19 AM
Forgot: The error that I´m reciving when I run the sub, is: "Unable to find an entry point named 'Main' in DLL 'PhilipsPR1602.dll'."
04-12-2013 03:32 AM
First issue solved,
I used the sub .vi instead and then I can select the parameter I want.
Still the error "cant find entry point named ...*... in .dll ...*... " Can i be an issue with the instalation. I found a thread saying that the installed .net framework must be compatable with CLR 2.0, how do I find out if it is?