Package: vicivalve
VICI valveThis repo contains a driver class for the VICI Valco Universal Electric Actuator (aka VICI valve). The code should work
for both the USB and the RS232/485 variety.This is an unofficial package; we are not affiliated with VICI (Valco Instruments Company Inc.).InstallationInstallvicivalvefrom PyPI by runningpip install vicivalveor addvicivalveto yourrequirements.txtfile.Alternately, runpip install git+https://gitlab.com/heingroup/vicivalveor addgit+https://gitlab.com/heingroup/vicivalveto yourrequirements.txtfile.Getting startedThis package is intended for use with theVICI Universal Electric Actuator.
This actuator works for two position and multiposition valves, and comes in two varieties: one with a USB B receptacle
at the back, and one with three pins that can be used with either RS232 or RS485. A third variety uses BCD (binary coded
decimal) but this version is not compatible with this library. Note also that the RS232/485 versions have two different
order codes, but according to themanualthey can be
converted by setting a switch on the PCB.The USB variety uses an FTDI chip and shows up as virtual COM port or VCP on your PC. The USB version works with this
package directly, just plug it into your PC and crack on. The RS232/485 version uses two
internally connected 3 pin TE Connectivity AMP connector headers. The valve comes with a mating cable assembly, the user
can also make their own connector (Housing:102241-1, contacts:87756-4). Either way, in order to work with this package, anFTDI USB to serial converter cableis required (I personally
recommend buying the wire ended FTDI cable and crimping on a connector). Theftdi_seriallibrary currently does not
work properly with non-FTDI converter cables!UsageThe package is meant to be as simple and user friendly as possible. The VICI class takes a Serial object as argument:fromftdi_serialimportSerialfromvicivalveimportVICIserial=Serial(device_serial='FOO',baudrate=9600)valve=VICI(serial=serial)Thedevice_serialis the unique serial number of your valve (if it's USB) or your converter cable. In order to find
that ID, plug in your valve/cable and runSerial.list_device_serials()from a Python console.The Baud rate is a property of the controller and needs to be set explicitly. 9600 is the default baud rate. If you can't
establish communication, a wrong baud rate is the most likely cause. Refer to themanualfor viewing and changing the baud rate of a controller.With RS485, multiple actuators can be daisy-chained and used with one USB converter. In that case, the sameSerialobject is passed to both valve instances:valve1=VICI(serial=serial,address=1)valve2=VICI(serial=serial,address=2)However, in that case, every valve has to have its own address. Refer to the manual for details on multidrop communication
and how to set the device address.Once instantiated, the valve can be switched like so:valve.home()# sends the valve to position A or 1valve.switch_valve("B")# sends the valve to position Bvalve.switch_valve(1)# sends the valve back to position A, using an integer as argumentvalve.toggle()# sends the valve to position B, since it was in A beforevalve.toggle()# sends the valve back to position ALastly, if a new valve head is installed, the actuator needs to "learn" the new end stop positions:valve.learn()This will stall the actuator against both end stops and record those positions. This takes a few seconds and sounds pretty
awful, but don't worry, it's supposed to work that way.AuthorsSebastian Steiner-Initial work, current maintainerSean Clark-Tech supportLicenseMITAcknowledgementsVICI ValcoStack Overflow