Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: How to programmatically access/change the property page of CWVISA

27 views
Skip to first unread message

Steve80

unread,
Jun 10, 2008, 3:10:10 PM6/10/08
to
Chris,
You say "All the properties and methods of the CWVISA control are listed in the ComponentWorks documentation with an explanation, and often, an example of usage."
 
in your previous message (some time back).  WHERE would I go to find such documentation?  I have downloaded the Active X control from the ni website, but cannot find ANY documentation of any kind about it.  Also - a search of the internet leads me to no company called ComponentWorks.  I have the control installed and can see the properties and events - but don't have a clue what methods are available and I can't even see a way to SEND anything to my instrument. ??
tia,
Steve
<a href="mailto:St...@WedgeTek.com" target="_blank">Steve&nbsp;at WedgeTek.com</a>

Jervin_J

unread,
Jun 11, 2008, 9:10:09 AM6/11/08
to
Hi Steve80,
&nbsp;
ComponentWorks is not a separate company, it is the name of one of National Instruments' software products. It was the precursor to <a href="http://www.ni.com/mstudio" target="_blank">Measurement Studio</a>, and we still support a lot of the older ComponentWorks ActiveX components.
&nbsp;
For help using CWVISA, I found the following tutorial that might be helpful:<a href="http://zone.ni.com/devzone/cda/tut/p/id/4058" target="_blank">Developer Zone Tutorial: Serial, GPIB, and VXI Communication with Measurement Studio VISA</a>
&nbsp;
Also, for a complete listing of VISA functions, please refer to the NI-VISA Function Reference.This can be found (assuming you have installed <a href="http://joule.ni.com/nidu/cds/fn/p/sb/navsRel/lang/en?q=visa&amp;x=13&amp;y=8" target="_blank">NI-VISA</a>) at: Start»Programs»National Instruments»VISA»Documentation»NI-VISA Help
The functions are listed under:NI-VISA Help»Function Reference»Operations.
&nbsp;
For the most part, these functions will work by (as shown in the tutorial) by omitting the vi prefix.

Steve80

unread,
Jun 11, 2008, 11:10:09 AM6/11/08
to
After installing the ocx, I compile OK, but as soon as I run, I get an EOleError -
CoInitialize not called.&nbsp; Seems like I need something like the
viOpenDefaultRM call used in VISA, but don't see any equivalent command
for the OCX. FYI - I installed the OCX and then dropped the component on my main form (I'm using Delphi, but that shouldn't matter here). My code is pretty simple.ocx.openocx.clearocx.write ('*idn?' + lf)&nbsp; // lf set as terminator in 'setup window'str = ocx.readocx.closeMy version of the OCX shows 'EVAL' across the Icon - could that have anything to do with it?&nbsp; I can't seem to find any other version anywhere on any site.&nbsp; This one came from the ni ftp site from a link found on the ni site.Steve

Jervin_J

unread,
Jun 12, 2008, 3:40:09 PM6/12/08
to
Hi Steve80,
&nbsp;
If you are using the CWVISA ActiveX component, as per the tutorial you should be able to configure/test things out on the Properties dialog.
&nbsp;
What happens if you try&nbsp;to perform a simple *idn? from the Test tab?

Jervin_J

unread,
Jun 13, 2008, 5:40:11 PM6/13/08
to
Hi Steve80,
I did a search for the error message and it doesn't look like a case of having to initialize anything with VISA, more to do with initializing the ActiveX Component.
In Delphi, it looks like you might have to call CoInitialize() first.
Something like: (from <a href="http://www.delphifaq.com/faq/delphi_windows_API/f511.shtml" target="_blank">http://www.delphifaq.com/faq/delphi_windows_API/f511.shtml</a>) initialization&nbsp; CoInitialize(nil); // &lt;-- manually call CoInitialize()
finalization&nbsp; CoUnInitialize; // &lt;-- free memory
With regards to seeing the Eval message on the control, this is because you downloaded the Measurement Studio evaluation version from our webpage. The CWVISA control is part of Measurement Studio and in order to get the full version, you would have to purchase Measurement Studio.

Jervin_J

unread,
Jun 16, 2008, 2:10:11 PM6/16/08
to
Hi Steve80,
The following Knowledgebase article outlines the limitations:<a href="http://digital.ni.com/public.nsf/allkb/B1D22664D134336A862568A1006F3B03?OpenDocument" target="_blank">KnowledgeBase 1VCD7E8M: Measurement Studio Evaluation Package Behavior</a>
0 new messages