Applied Logic Engineering offer a simple solution to send LANC commands from a Laptop. Their $85 USB to LANC cable (#ALE708) contains an ELM 624 chip and an USB interface. No other hardware or software driver is required — the adapter works via a virtual COM (serial) port that is automatically created when the cable is plugged into the computer.
The cable can be used manually with terminal emulation software by just typing in the commands. It is compatible with Windows, Linux, and Macintosh operating systems.
I ordered the cable and can now use AppleScript to send LANC commands.
How to send LANC commands using AppleScript
1) Download the AppleScript extension SerialPort X.2) Copy the file SerialPort X.osax to your_username/library/ScriptingAdditions/
3) Start the AppleScript Editor and copy and paste the script below.
4) Connect the USB to LANC cable to the USB port.
5) Open a new AppleScript window and type serialport list. Run this one-line script and find the name of the serial port used by the cable. Something like "/dev/cu.usbserial-A7TP5NWJ"
6) Change the name in the script below to the one found by serialport list.
7) Connect the cable to the camera and turn it on.
8) Run the AppleScript. The camera should start recording after two seconds.
-- Uses SerialPort X from http://mysite.verizon.net/vzenuoqe/MacSoft.html -- Use "serialport list" to find the name of the serial port set portRef to serialport open "/dev/cu.usbserial-A7TP5NWJ" bps rate 9600 data bits 8 parity 0 stop bits 1 handshake 0 if portRef is equal to -1 then display dialog "Could not open serial port" buttons {"OK"} default button 1 else delay 2 serialport write "1833" & return to portRef -- 1833 is the LANC command to start/stop video recording serialport close portRef end if
Applied Logic Engineering
Elm Electronics ELM 624
SerialPort X
No comments:
Post a Comment