Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

cwserial

Hi!

I have some difficulties using the CWSerial ocx component. I want to use it under Visual J++ (6.0), it's test possibility (on the Properties's test panel) works fine, I can send and receive data, but when I want to use it's methods, it doesn't work (the problem can be in using the Variant datatype). Can you send me a short VJ++ example that sends and receives data from the serial port?

Thank you in advance!

Steven Racz
Software Developer
GE Hungary
0 Kudos
Message 1 of 2
(3,194 Views)
Hi Steven,

The ComponentWorks controls were not intended to be used in Visual J++ or to be used with the Java language, but since Visual J++ does allow you to insert COM objects and ActiveX controls into your forms by doing a lot of things behind the scenes for you it may be possible to make them work.

Here is a guide on the Microsoft Developer Network (the definitve source for usage issues of the Microsoft IDEs) that talks about calling methods of COM objects and ActiveX controls:

http://msdn.microsoft.com/library/devprods/vs6/visualj/vjcore/vjovrprogrammersguide.htm

On a final note you should be aware that since Visual J++ has to interface the native code of an ActiveX control with the Java language there may be some complications, and National Instruments doe
s not provide support for technical issues/complications of using ComponentWorks in Visual J++.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 2
(3,194 Views)