LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Name Property Restrictions

I am using an 8421 serial card, so to write or read on Port 1 you need a Visa Write with the "Visa Resource Name" "ASRL11::INSTR".

 

I call the Serial Daemon template and then rename it to the instance and it throws an error "Error 1 occurred at Property Node (arg 1) in Daemon Control.vi" when I try to name the daemon "Serial Daemon(ASRL11::INSTR).vi"

 

I do the same thin with my analog cards except I call them "Analog Daemon(Dev3/line2).vi"

 

I'm assuming it has something to do with the :: in the name, am I correct? Also, what are some other restrictions in dynamically naming VIs? 

 

 

0 Kudos
Message 1 of 7
(3,141 Views)

I forgot to insert the image.

 

 

serial problem.PNG

0 Kudos
Message 2 of 7
(3,139 Views)

NelsonUWP wrote:
I'm assuming it has something to do with the :: in the name, am I correct?

Yup.

 


Also, what are some other restrictions in dynamically naming VIs?

 

Depends on your operating system. You need to follow the naming restrictions it imposes.

Message 3 of 7
(3,132 Views)
The colon is used for indicating a VI's fully qualified name when it's part of a library, like a class or an XControl (for example "myclass.lvclass:VI 1.vi"), so it can't be used as part of the VI's name. In the example, the VI is called VI 1.vi, but it's part of the class, so you need that part as well to access it.

A quick test seems to indicate that the property accepts any other ASCII character.

___________________
Try to take over the world!
Message 4 of 7
(3,131 Views)

tst wrote:
A quick test seems to indicate that the property accepts any other ASCII character.

I'm guessing that's probably because it can be (ultimately) saved inside of a LLB, which bypasses OS naming restrictions? I was basing my answer on not ultimately using an LLBs when creating the name of a VI. The other assumption I was making was that this VI was being saved to disk, although now that I re-read the original post, perhaps this is never actually happening?

0 Kudos
Message 5 of 7
(3,129 Views)

Ulitmately what I'm trying to accomplish is to have the user input, say, "Serial Port 1". I then go to a config file, grab the "ASRL11::INSTR" from the "Serial Port 1" key, then make that the Daemon name all while passing it as the Visa Reference Handle. I'm assuming I will need to do a string replace for "::" to some other character when I name it and pass the original line to the acutal Daemon. 

 

Any better suggestions? 

0 Kudos
Message 6 of 7
(3,126 Views)

You don't need to name the VI. You could simply have a VI for managing the connections which will hold an array of names (or VISA resources) and an array of VI references. You do a lookup on the first to get the reference from the second.

 

If what you want is for display purposes, you can use the Front Panel Window>Title property. 


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(3,098 Views)