07-29-2009 09:54 AM
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?
07-29-2009 09:57 AM
I forgot to insert the image.
07-29-2009 10:16 AM
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.
07-29-2009 10:18 AM
07-29-2009 10:27 AM
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?
07-29-2009 10:35 AM
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?
07-29-2009 11:07 AM
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.