09-21-2017 08:28 AM
Hello
I need to write some LabVIEW code to auto populate some fields within the Bluehill 3 software that runs an Instron servo-hydraulic testing system. The code will retrieve relevant data from a database and then fill in the required fields in the Bluehill 3 software prior to testing. The database connectivity side of things is fine, but I'm having real problems getting LabVIEW to communicate with the Bluehill 3 API - this is what I would appreciate some guidance with.
Details of the basic set-up :
- Using LabVIEW 2016 32-bit software on the development machine.
- Using Bluehill 3 software (v3.72.4715) which uses the .NET Framework 4.5 for the API.
(Note Bluehill 2 uses ActiveX for it's API, I believe, for which any examples are not usable here)
- .NET Framework 4.7.02053 installed on development machine (assume this covers the .NET 4.5 requirement?)
- CLR v4.0.30319 installed on development machine.
- I'm running Bluehill 3 in stand-alone mode, since I don't have the luxury at the moment of developing the software on the pc running the Instron (Instron have told me this should not be an issue as far as the Bluehill API is concerned).
- Within the Bluehill 3 software, I have the 'BluehillWCF' selected as the API type.
What I have done :
Via the LabVIEW .NET connectivity palette I can use the Invoke Node to read the BluehillWCF.dll and create a method called APIHeartbeat. This is a boolean which returns True if there is a Bluehill WCF service available, so that is what I want to achieve i.e. check there is a link. I have used a Constructor as a reference to the Invoke Node, see below.
Simple .vi to test communication
Whilst Bluehill 3 is running, I would expect a true value, but I cannot get this to work. Of concern is the note that "Version=0.0.0.0" and "PublicKeyToken=null" shown the pic above, which appears when I hover over the Constructor or the Invoke Node blocks. I've read elsewhere there should not be a null key value, and the zero Version number does not seem right!
The code seems to be reading the .dll fine since it shows all the Methods available...
Methods available
I've tried selecting other Methods to see if I can get a useful output, but I cant.
The details for the .NET assemblies seems to be ok, I think...
Assemblies in memory info
The BluehillWCF.dll path is the default path as set when the Bluehill software is installed. I've tried moving this to the top level .vi location, but this does not seem to help (i read elsewhere on the forum it might). I've also read that maybe the API needs to be 'strongly named' to create a key but I'm not sure exactly how to do this or even if it is necessary.
I've looked at other postings regarding communication between the Bluehill 3 API and LabVIEW, but I cannot see anywhere that anyone has had any luck.
Any help with this appreciated since I am a .NET novice and I'm not sure what to do next.
Owen K.
07-10-2018 09:38 AM
Hi Owen,
Do you have the API Manual?
this normally shows up some important things
Daniel