I'm also trying to control a 4 port 2 position VICI valves but I don't know how to start. The vi provided by pbuckley looks interesting but some vi are missing so if one of you have fix this problem if you can share your solution.
It seems that many of the contributors on this forum have had success with the LabVIEW examples. I would suggest starting with an example by going to LabVIEW Help->Find Examples->Hardware Input and Output->Serial. If, after starting this example, you run into problems, you can then search your error codes on our website to troubleshoot any errors. Useful articles include knowledgebases, tutorials, discussion forums, etc. Good luck with your project!
To tell the VICI valve which position to go to, I'd use the GO command.
My vi is set up like this:
VISA Configure Serial Port ------ T/F while loop[ VISA Write to File (string: GO # \r) ]---------- VISA Close
I use the concatenate strings to format the inputs for the VISA write to file.
As far as the commands go, here's the list I've compiled. This should give you all the control capabilities you need to work with any style of Valco valve.
Write the command in the Write Buffer followed by the carriage return \r. Then run the program. If you have multiple valves daisy chained, start each command with the valve number. For example, if you want valve 1 to move to position B, type 1GOB\r in the write buffer.
Available Serial Commands:
NP \r - # actuator positons indexed
NPnn \r - Sets # of positions (nn)
CWnn \r - CW motion to nn
CCnn \r - CC motion to nn
GOnn \r - Sends actuator to nn fastest route possible
CP \r - Displays current position
SD \r - Displays DI status
SDn \r - Sets DI status
SM \r - Displays rotational direction for DIs
SM LL \r - Sets rotational direction for DIs
ID \r - Displays device ID setting
IDn \r - Sets device ID setting
SB \r - Displays current baud rate
SBnnnn \r - Sets baud rate
SL \r - Displays current Data Latch signal status
SLn \r - Changes Data Latch signal status
SO \r - Displays current offset value
SOnn \r - Sets offset value
VR \r - Displays P/N and firmware date
/? \r - Lists possible commands