AnsweredAssumed Answered

vrf Changing Com Port

Question asked by michael.asbery on Apr 9, 2002
Ashley,

Vee only relies on the device name to send information to.  If you code up
an application to talk to a device called 'Dev1' attached to Com1, to change
the program to make that device be on Com2, manually go into the Instrument
Manager and attach 'Dev1' to Com2.  All your Direct I/O for 'Dev1' will now
globally be sent to Com2.

If the requirement is to Change com ports on the fly then:

- Create multiple devices in the instrument manager configured for each com
port, ie.
     Dev1 : Com1, 9600,8,N,1
     Dev2 : Com2, 9600,8,N,1
     ...

Ask the user which com port is to be used (1, 2, ...)
Based on this decision, set a text variable: Device = Dev1, Dev2, ... as
appropriate.

On every DirectI/O object that talks to this device, add a ControlInput :
Devicename.

For execution:

GetVariable(Device)  ->  Direct I/O (Devicename)

Ensure the Get variable fires before the DirectI/O and your program should
then change com ports on the fly.

Hope this helps,

Mike Asbery

-----Original Message-----
From: owner-vrf@lvld.agilent.com [mailto:owner-vrf@lvld.agilent.com]On
Behalf Of ASHLEYDER@aol.com
Sent: Wednesday, April 10, 2002 4:12 AM
To: vrf@lvld.agilent.com
Subject: vrf Changing Com Port


Hello,

Anyone know how to globaly change over from Com1 to Com2 within a Vee
program? I usually write everthing to use Com1 (as many Laptops don't have
Com2 socket or need port replicator/docking station to access). But
sometimes
customer wants to use Com2. Any ideas how to do thins simply?

regards,

Ashley Derrick
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

Outcomes