LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Active X and serial communications to a device

I am trying to get to first base with ActiveX. My quest is to control a telescope mount that comes with an ActiveX driver. I can open an automation reference to a large number of items (classes, objects, ?) and use property and invoke nodes to get some code written. What is really unclear to me is exactly how the serial communications needs to be handled. I can set this thing up with VISA reads and writes and get everything I want so I know the link is set up correctly.

 

So, the question is, what else do I have to do to make this thing talk using the Active X tools? Do I need to explicitly open a port just as I would for VISA comms, and if so, how do I aim the Active X stuff at that port? I can find plenty of software to software Active X examples, but nothing the goes through full software-hardware serial comms-software path. Does anyone have some code they could point me at?

 

Thanks in advance,

Dave

0 Kudos
Message 1 of 6
(4,525 Views)
Frankly, we have no idea because we have no clue as to what telescope mount you're using, or have any of the documentation. Surely the unit came with some programming information?
0 Kudos
Message 2 of 6
(4,509 Views)

Hi Rimfire,

 

If you're just looking for some examples of using ActiveX with serial control, check out this forum: activex control of stepper motor

 

On a broader note, if you are able to do what you want with VISA, is there a specific reason for replicating this with ActiveX?  Does the ActiveX driver provide increased functionality that you haven't been able to replicate with VISA?

Message Edited by VTHokie on 05-26-2010 06:25 PM
0 Kudos
Message 3 of 6
(4,486 Views)

Sorry for the slow reply. For some reason the site is not emailing me when someone responds.

 

The telescope mount is an Astrophysics 1200 GTO and the driver is supplied from an open source code group called ASCOM. Unfortunately, documentation is pretty sketchy. Having said that, the real issue here is my ignorance not the mount or driver.

 

In the LabVIEW world that I am used to coding in, the serial port configuration and controls are explicit functions. Open the pallette, code, and run. I am seeing from the example that Greg's sent that the methodology is completely different when working with the ActiveX stuff, i.e. the actual communications link is established using  an invoke node. Or at least I think that is what is going on. I know where to restart the experiment anyway.

 

Greg, to answer your question about VISA versus ActiveX I guess the response is "Darned if I know".  ActiveX and .NET seem to show up everywhere these days especially on employer sites looking for programmers. I figured it was time to dive in. Easy to get caught up in the buzz words. The truth is though that I don't know why you would choose one way over the other.

 

Thanks for the links. After reading a ton of documentation in the NI site, I still managed to miss this ActiveX and LabVIEW basics page.  I am now ignorant at a much higher level than I was before 🙂

0 Kudos
Message 4 of 6
(4,455 Views)
You would use ActiveX or .NET if the driver you got was an ActiveX library or a .NET assembly. Otherwise, there's no reason to use. Did this driver from ASCOM come in one of these forms? What documentation do you actually have?
0 Kudos
Message 5 of 6
(4,434 Views)

There is no standard way of doing serial communication (or any communication) through ActiveX or .Net. Each ActiveX (.Net) developer is free to implement it in whatever way he feels right and export the API he thinks is appropriate for that. So yes you will likely use method nodes to open a connection but which specific method to use is not standardized. It may be called Open(), Connect() or some silly other name. It may have all necessary parameters, or require you to set all parameters after opening it, using other method or property nodes. A really weird ActiveX API may even require you to use a property node to open a connection, whatever the programmer of that ActiveX component felt like!

 

VISA on the other hand is a standardized API even if the standard is mainly setup by one entity, National Instruments (and some might argue that it is rather the VXI PnP Alliance, but that are mainly semantics Smiley Very Happy )

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(4,409 Views)