LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Telnet and Ping applications

How do I use these applications with Labwindows/CVI (5.5)?
I have no idea where to start looking.

I am using VB6 with Telnet and Ping activeX. Can those be used by CVI?

Thanks
Rafi
0 Kudos
Message 1 of 15
(4,761 Views)
2 options, call command line telnet.exe or ping from you CVI program.
Problem is you can not read/write to the process as you go. You can take
input from a file and dump it to another file.

Better option is use one of the third party activeX controls. I don't
know why NI would not include telnet control for CVI when they do same
for LV guys (the favorite child, I guess).


vishi

Rafi Kfir wrote:
> How do I use these applications with Labwindows/CVI (5.5)?
> I have no idea where to start looking.
>
> I am using VB6 with Telnet and Ping activeX. Can those be used by CVI?
>
> Thanks
> Rafi
0 Kudos
Message 2 of 15
(4,761 Views)
1)
> 2 options, call command line telnet.exe or ping from you CVI program.
> Problem is you can not read/write to the process as you go. You can take
> input from a file and dump it to another file.

Can you elaborate on this, please? Are you refering to the Windows
Telnet and ping program? If so, how do I activate them from CVI?



2)
> Better option is use one of the third party activeX controls. I don't
> know why NI would not include telnet control for CVI when they do same
> for LV guys (the favorite child, I guess).

What kind of activeX am I looking for?
I found at www.distinct.com ActiveX for MS VC++ or DLL32 bit for MS
c/c++.
Will they work for me, or should I look for something specific for
LabWindows/CVI?

Thanks
Rafi
0 Kudos
Message 3 of 15
(4,761 Views)
You can use activex controls in CVI 5.5. You can right click on the panel and chose "activex" to insert the control on the panel. If you right-click on the activex control, you have the option "Generate Activex Controller Driver". Select that to let CVI create the wrapper functions for you. So you should be able to use the activex control is pretty much the same way as you did in VB.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 4 of 15
(4,761 Views)
Rafi Kfir wrote:
> 1)
>
>>2 options, call command line telnet.exe or ping from you CVI program.
>>Problem is you can not read/write to the process as you go. You can take
>>input from a file and dump it to another file.
>
>
> Can you elaborate on this, please? Are you refering to the Windows
> Telnet and ping program? If so, how do I activate them from CVI?
>
>

yes, just call windows telnet.exe from CVI. Problem comes that you can
not create a CVI program which will simulate a user typing commands and
reading response. You can not get a handle to the process and read/write
from/to it like a file. ActiveX control will let you do that. You can
open a connection, and then do read/write and close when done. If all
you need to do is login
to a telnet port, send something, and process
output after closing connection, you can make a command line which takes
its input from a file and redirects output to another file. You call
this command line from your CVI program, and process the output file.

What I have also found is that you can also just use low level TCP (from
CVI) and open connection to port 80 (I guess for telnet). You will get
some garbage chars which you can filter. I am doing this right now and
it works.

For ping, you can also use windows ping program. Just call it from CVI
(as system command where you redirect output to a file) or launching an EXE.


>
> 2)
>
>>Better option is use one of the third party activeX controls. I don't
>>know why NI would not include telnet control for CVI when they do same
>>for LV guys (the favorite child, I guess).
>
>
> What kind of activeX am I looking for?
> I found at www.distinct.com ActiveX for MS VC++ or DLL32 bit for MS
> c/c++.
> Will they work for me, o
r should I look for something specific for
> LabWindows/CVI?
>
> Thanks
> Rafi

I haven't used distinct tools with CVI. But they are one of the best
ones out there (I personally know the people who wrote the original code).


vishi
0 Kudos
Message 5 of 15
(4,761 Views)
Thank you Vishai for the extensive answere,

What I have done so far was an attempt to use the ActiveX componnent
we use in our VB program (Catalyst).

I have not seen how to install ACtiveX componnent in CVI except in the
"Tools->Create ActiveX Automation Controller" which allowed me to make
an .fp file (instrument driver?!) which can be loaded and used in the
project.

The bottom line is that it didn't work. I used a new,connect, read
and write and also set the componnent attributes to be the same as
those we use in the VB program (e.g. RemotePort=23, Binary=True,
Blocking=False, AutoResolve=True, Echo=False, Terminal=ANSI,
Timeout=10).

My question is whether this is the correct approach to use an ActiveX
component?
Any ideas where to se
arch for answeres?

Thanks
Rafi
0 Kudos
Message 6 of 15
(4,761 Views)
If the activeX control is registered on your machine, it will show up
when you try to create the wrapper .fp (like you did). Don't know why it
wouldn't work in CVI. Try downloading some other activeX control for
telnet. I know some companied let you download a demo version. See if
that helps.


vishi

Rafi Kfir wrote:
> Thank you Vishai for the extensive answere,
>
> What I have done so far was an attempt to use the ActiveX componnent
> we use in our VB program (Catalyst).
>
> I have not seen how to install ACtiveX componnent in CVI except in the
> "Tools->Create ActiveX Automation Controller" which allowed me to make
> an .fp file (instrument driver?!) which can be loaded and used in the
> project.
>
> The bottom line is
that it didn't work. I used a new,connect, read
> and write and also set the componnent attributes to be the same as
> those we use in the VB program (e.g. RemotePort=23, Binary=True,
> Blocking=False, AutoResolve=True, Echo=False, Terminal=ANSI,
> Timeout=10).
>
> My question is whether this is the correct approach to use an ActiveX
> component?
> Any ideas where to search for answeres?
>
> Thanks
> Rafi
0 Kudos
Message 7 of 15
(4,761 Views)
Thnak you Bilal,

I'm right clicking on the panel and there is no "activex" in the
list??!

Are you talking about a *.uir panel or something else?

The only place I can find activex is in tools->Create ActiveX
Automation Controller, which I'm still trying out without success so
far....

Thanks
Rafi




bilalD wrote in message news:<5065000000050000004A480100-1068850981000@exchange.ni.com>...
> You can use activex controls in CVI 5.5. You can right click on the
> panel and chose "activex" to insert the control on the panel. If you
> right-click on the activex control, you have the option "Generate
> Activex Controller Driver". Select that to let CVI create the wrapper
> functions for you. So you should be able to use the activex control is
> pret
ty much the same way as you did in VB.
>
> Bilal Durrani
> NI
0 Kudos
Message 8 of 15
(4,761 Views)
Rafi,

From what I know ActiveX controls have GUI elements. To use them you
need to put them on your panel (CVI panel).

The ActiveX servers don't have GUI. So you can use them as is.

For both, you need to generate the wrapper code using the ActiveX
controller wizard of CVI.


vishi

Rafi Kfir wrote:
> Thnak you Bilal,
>
> I'm right clicking on the panel and there is no "activex" in the
> list??!
>
> Are you talking about a *.uir panel or something else?
>
> The only place I can find activex is in tools->Create ActiveX
> Automation Controller, which I'm still trying out without success so
> far....
>
> Thanks
> Rafi
>
>
>
>
> bilalD wrote in message news:<5065000000050000004A480100-1068850981000@exchange.ni.com>...
>
>>Y
ou can use activex controls in CVI 5.5. You can right click on the
>>panel and chose "activex" to insert the control on the panel. If you
>>right-click on the activex control, you have the option "Generate
>>Activex Controller Driver". Select that to let CVI create the wrapper
>>functions for you. So you should be able to use the activex control is
>>pretty much the same way as you did in VB.
>>
>>Bilal Durrani
>>NI
>
0 Kudos
Message 9 of 15
(4,761 Views)
yup, vishi is correct. I should have made it more clear perhaps. But you will need to right click on the GUI,which in CVI is the UIR file. Once you have the UIR open, you can right-click on the UIR and choose the activex option.

Once the control is inserted, you can right click on the control itself to generate the wrapper functions.

Bilal
Bilal Durrani
NI
0 Kudos
Message 10 of 15
(4,523 Views)