Serial Devices Reference Manual Improvision, Viscount Centre II, University of Warwick Science Park, Millburn Hill Road, Coventry. CV4 7HS Tel: 0044 (0) 24 7669 2229 Fax: 0044 (0) 24 7669 0091 e-Mail: [email protected] Internet: http://www.improvision.com Printing History Edition Date Edition 1 September 1998 Edition 2 July 1999 Improvision believes the information in this manual to be correct at the date of issue. However, it is subject to change at any time and does not represent a commitment on the part of Improvision. Improvision shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual. Improvision has a policy of continual development and reserves the right to change information within this manual without notice to reflect changes in the system’s design and specification. © 1998-1999 Improvision, Image Processing & Vision Company Limited. All rights reserved. Copyright Notice Apple, Finder and Macintosh are registered trademarks of Apple Computer, Inc. Other brand or product names are the trademarks of their respective holders. SERIAL DEVICES Background Information Overview Openlab software supports connections to a number of serial devices. This means that you can control devices directly from the Macintosh, for example microscopes, focus drives, filter assemblies or cameras, such as the DAGE, that are connected to a serial port. Serial devices are connected to a serial port on the back of the Macintosh. Grey G3 and earlier machines connect via the Printer or Modem serial port. Blue G3 machines and later connect via the USB serial port. This is described in more detail in the “Connecting Serial Devices” section. Once you have connected a serial device, you must tell the software that the device is available for use. You do this by editing the Serial Port Preferences (see “Serial Port Preferences” section). If you have a Ludl or Leica device, you will also need to edit device-specific Preferences. This is described in the next chapter, “Device-Specific Information”. Devices Supported The following diagram illustrates the different devices that are supported. The shaded boxes represent the software interface(cid:190)each has an Openlab Palette. The white boxes are device specific hardware control modules. The Serial Ports Manager is common to all users. It allows you to specify a port for each device that is connected to your Macintosh. Different users will have different combinations of device. You will receive the appropriate Openlab modules for your devices. Software Interface Filter Shutter X/Y Stage Focus Drive Other... Camera Palettes Hardware Control Leica Zeiss Olympus Ludl DAGE, Modules DC-330 Serial Ports Manager Serial Devices 1 OPENLAB This guide describes how to connect serial devices and configure the serial preferences. There are separate User Guides for each device, for example the Microscope Reference Guide. There may also be additional information for different makes/models. These variations are documented in the next chapter, “Device-Specific Information”. Contents BACKGROUND INFORMATION................................................1 Overview.....................................................................................................1 Contents.....................................................................................................2 Connecting Serial Devices..............................................................................2 Serial Port Preferences..................................................................................4 Serial Comms and Automator Tasks.................................................................5 An Example Automation.................................................................................9 DEVICE-SPECIFIC INFORMATION........................................... 10 Devices Supported......................................................................................10 Related Documentation................................................................................11 Ludl Devices..............................................................................................11 Connecting Serial Devices Grey G3 and Earlier Models The serial ports are the small round ports on the back of the computer. They are clearly marked, as follows: Printer port Modem port It is possible to have more ports, but you will require additional boards from another supplier. 2 Openlab v.2.0.7 SERIAL DEVICES The following cabling guidelines apply: n Make sure that you use the correct cable for each device. n If both serial ports are already in use, you can unplug an existing device, but make sure that you are not disconnecting a device that is required. n If both serial ports are already in use, you may need to install an expansion card or module with additional serial ports. Contact your Supplier or Improvision for further details. n It is possible to control serial devices over a network, but you will need additional third-party software. Contact your Supplier or Improvision for further details. Blue G3 and Later Models Blue G3 and later models have a USB RS serial port, and a built-in modem port. You need a USB Keyspan serial adapter, which provides two ADB ports to which you can connect serial devices. As long as you have attached the USB Keyspan serial adapter before you install the Openlab software, the Serial Port Preferences will automatically reflect the USB Keyspan ports (rather than the printer and modem port). If you install the Openlab software before you connect the Keyspan adapter, you will also need to install Openlab USB Support from the Openlab Installation CD. USB port Serial Devices 3 OPENLAB Serial Port Preferences These Preferences allow you to specify additional devices that may be connected to the serial ports on your computer. You may specify any number of devices, but the number that you can connect at any given time depends upon how many serial ports you have free. The preferences come into effect as soon as you save them. 1. Select Preferences... from the Edit menu. 2. Click on the Serial Ports icon in the left-hand column. Note: The Serial Preferences above apply to grey G3 and earlier models. The port icons and names will be different for blue G3 and later models that connect via USB ports. 3. This window shows which hardware devices are connected to your Macintosh and which port they are plugged into. 4. Click on the pop-up menu in the Is connected to: column to select a serial port for the device. Note: If there are additional ports installed, either as part of an expansion card or over a network, they will appear in this menu. 5. Click on the Save button to save the Serial Port Preferences. 4 Openlab v.2.0.7 SERIAL DEVICES Hints and Tips If you want to see a list of all devices, and not just the ones that are currently connected to a serial port, make sure that the Show devices not currently available box is checked (has an ‘X’ in it). If the device does not work, check that: n The cable is firmly connected, to both the device and the serial port on the Macintosh. n The device is switched on. n You have loaded the correct software module for the device. Serial Comms and Automator Tasks If you have the Automator module, you will be able to use Serial Comms tasks in your automation. The tasks will appear in the Task List in the Automator Window. This section describes the Serial Comms tasks. These tasks allow you to check that the serial port is working correctly by sending and receiving a serial line or byte of data. You can also use them to communicate with devices that Openlab does not Serial Devices 5 OPENLAB currently support, as long as the devices are attached to the serial port and support serial communications. Refer to the Automator Reference Manual for further details about creating and running automations. Note: You can operate some serial devices outside the strict bounds of the Openlab hardware control and software interface modules (palettes). For example, the Uniblitz shutter runs with its own controller. Send Serial Line Task This task allows you to send a line of text to the serial port. Use the Setup dialogue to enter an expression for the line of text that you want to send to the serial port. Enter an expression for the message text You can also use this task to send commands that open or close a shutter. The relevant text is: n “@” to open the shutter n “A” to close the shutter 6 Openlab v.2.0.7 SERIAL DEVICES Receive Serial Line Task This task allows you to receive a line of text and store it. Use the Setup dialogue to: n Specify where the line of text is to be stored. n Set a timeout value, so that the serial port does not wait indefinitely for more data. Select a variable to store the result Enter an expression for the timeout value Send Serial Byte Task This task allows you to send a byte of data to the serial port. Use the Setup dialogue to enter an expression for the byte that you want to send to the serial port. Serial Devices 7 OPENLAB Receive Serial Byte Task This task allows you to receive a byte of data and store it. Use the Setup dialogue to: n Specify where the byte is to be stored. n Set a timeout value, so that the serial port does not wait indefinitely for more data. Flush Receive Buffer Task This task flushes the receive buffer. Use it to ensure that the serial buffer is empty before you receive serial line communication. There is no setup dialogue. 8 Openlab v.2.0.7
Description: