Using Microsoft Visual Studio C++ 2005 to run simple scope

Using Microsoft Visual Studio C++ 2005 to run simple scope, a forum discussion on Cleverscope. Join us for more discussions on Using Microsoft Visual Studio C++ 2005 to run simple scope on our Other Issues forum.

Back to Forum Index : Back to Other Issues   RSS

18 Feb 2009
Posts:

Im attempting to run the example code given on the cleverscope cd with Microsoft VS C++ 2005. The example project builds fine, but when debugging i get this error

Internal Error: ""confog.cpp"", line 429
LabVIEW version
For assitance in resolving this problem, please exit and relaunch LabVIEW, or contact National Instruments.

The goal is to get this going in order to modify it. Any suggestions?

18 Feb 2009
Posts: 395

Hello Patrick, Can you please verify that the Simplescope.exe in the example runs fine - we know that works here.
I assume you have copied the DLL into the project (it complains if you don't).

I also assume that you have installed the Cleverscope app on this machine, and that you have Cleverscope working fine (we rely on the NI runtime being in place).

We don't know this error :(- but we will look to see if we can make it happen.

23 Mar 2009
Posts:

Hiya Patrick,

How's LTJ?

just wondering if you got your cleverscope running under C in the end? I think I compiled under vc++ at one stage, though it was probably just the code Jevon wrote. The bit that bothered me is I couldn't seem to get access to all the frames, no matter which way I tried. That was a while ago now though, and things have likely improved. Let me know how you fared!

These days I'm resigned to using a script that literally just moves the mouse and clicks the buttons needed in the cleverscope app. Not quick, not elegant, stuffs up 1 time in 10, but it works.

Could send you a copy if you want.

Morgan

23 Mar 2009
Posts: 395

Hello Morgan and Patrick,
We are pretty certain frames work well now - we spent a fair time fixing things up here and there. We do have a Labview example - Bandpass response, in the examples, that shows how frames can be used. When we get time, we will write a C++ version. But back to your problem Patrick - did you verify that the SimpleScope.exe works fine (this at least shows that the environment is fine). Also how old is your CD? We have two versions of the driver out there - and version 2 (which is on the website in the resources directory) has been designed to be much more bullet proof - with proper recovery from disconnects etc. It also supports multiple connected Cleverscopes, and we recommend using it rather than the earlier version 1.
Anyway, please confirm the simplescope.exe operation.

24 Mar 2009
Posts:

Hi,

I had a go yesterday with msvc 2008 (Express Edition), and thought I'd try asking about the results. The main problem is that marshal.h isn't included in the express edition, but is#defined in for vc++ versions 2008 and greater. If I'm not wrong, the Marshal class is used for working between managed and unmanaged code. I'm guessing the problem here is that labview is very much managed. Is there an easy way around this? I'm assuming Patrick's already ahead of this, that probably being the reason he's using msvc 2005.

Morgan

24 Mar 2009
Posts: 395

Hello morgan,
In fact the DLL that we publish, even though built in Labview, is a straight DLL, and therefore unmanaged. So in MSC C++, C# you have to marshal it from unmamanged to managed code, which we do in the cscope interface module. We include these lines for MSC 2008+:

#if _MSC_VER > 1499 // Visual C++ 2008 only
#include <msclr/marshal.h>
using namespace msclr::interop;
#endif

These lines provide the interop service which is provided as standard in versions before C++ 2008.

But please, there are two possible reasons it won't work - one is environmental, and the other is that you do not have your compiler setup properly. To eliminate the environmental, does the simplescope.exe in the applicable subdirectory work?? Note that you will have to load Cscope Control Driver.dll into the directory before it will work (we only gave you one copy to save space). Getting simplescope.exe to work is a first step in proving where the problem lies.

Note that we have simplescope.exe versions built in each of the toolsets - Delphi, Borland C++ builder, Visaual Studio 2005 C++ or C#

29 Mar 2009
Posts:

Hi again,

I tried running the pre-compiled simple scope.exe for each of c#, vc++, and borland. c# and borland will both open, but both say ""CAU status"" that the run-time is closed, and the reopen button does nothing. The vc++ executable won't start with a fairly unhelpful error message- ""The application failed to start because the application configuration is incorrect"". All the directories have a copy of ""cscope control driver.dll"", and there's also one in windows/system32.

Am I missing something obvious?

Morgan

2 Apr 2009
Posts: 395

Hi,
Do you have the NI-Visa driver loaded? If you use Device Manager, you should have an entry for NI-VISA USB devices, and under that an entry for Cleverscope CS328A MSO XP/Vista.

If you are still using the Quick USB driver, the version 2 drivers will not work. The Quick USB driver results in an entry in the Universal Serial Bus controllers device list.

To fix this, get the latest update, and follow the instructions in 'Cleverscope Update USB driver.pdf'.

Please let me know the outcome!

Bart

16 Apr 2009
Posts:

Hi again,

sorry about the delay. I'm definitely using the NI-VISA driver, and in Device Manager it does indeed have an entry under NI-VISA of ""Cleverscope CS328A MSO XP"", and no mention of the cleverscope in the USB Controllers device list.

Clutching at straws, I tried running the examples with and without the main Cleverscope app running, no difference. I'm pretty stumped, but neither am I all that worried about it right now. I have had non-gui code working with the cleverscope in the past (c++ using mingw), and at some stage when I sit down to update it to the newer interface, I suspect the silly things I'm missing will become obvious.

Thanks for your help!

Morgan

17 Apr 2009
Posts: 395

Hello Morgan,
As part of the update, you will see that there was a need to install NI-Visa. Perhaps you have missed out this step. It's step 2 in the update instruction.
Does the Cleverscope app acquire signals correctly (as in click on Auto, and you see something). If the Cleverscope app runs at the same time, it will use the Acquisition Unit USB port. That particular port is therefore not available, and so the simplescope app won't be able to talk to the acquisition unit.
Back to Forum Index : Back to Other Issues   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.

×

Your shopping cart is empty.