From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code Interface Nodes

Hello there,

Need to call the serial port (say Com1) from
within a CIN.

(Before the CIN is called, the LV serial vi has
initialized Com1 & established communications with
the device connected to this port).


Any ideas ???
Thanks
Nicos Skouras



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 3
(4,190 Views)
Hi,

I wouldn't do that. There are no special LabVIEW CIN functions you can call
to
operate on the port. You will need to use the Windows (Macinstosh/Linux or
whatever) serial port API functions.
Because of this it may be much easier to just write a DLL/shared library
with
your functionality if you can't handle the necessary tasks with the build
in serial
port or VISA functions.

nicoss@my-deja.com wrote in article <7psles$t0i$1@nnrp1.deja.com>...
> Hello there,
>
> Need to call the serial port (say Com1) from
> within a CIN.
>
> (Before the CIN is called, the LV serial vi has
> initialized Com1 & established communications with
> the device connected to this port).
>
>
> Any ideas ???
> Thanks
> Nicos Skouras
>
>
>
> Sent via Deja.com http://www.deja.com/

> Share what you know. Learn what you don't.
>
Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 3
(4,190 Views)
Nicos:

One other possibility is for you to call VISA from your CIN.
You would need to pass the VISA refnum to the CIN as a U32.
This conversion will pass the actual VISA session number.
You can take that U32 and pass it to VISA as the ViSession value.
Obviously this would require you to use VISA rather than LV serial.
And you still couldn't call the OS serial APIs directly, either.
But it may give you more flexibility than you would have otherwise.
Let me know if you have further questions.

Dan Mondrik
Senior Software Engineer, VISA/VXI
National Instruments

> > Need to call the serial port (say Com1) from
> > within a CIN.
> >
> > (Before the CIN is called, the LV serial vi has
> > initialized Com1 & established communications with
> > the device conn
ected to this port).


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 3 of 3
(4,185 Views)