07 1 SerialDiscrete PDF
07 1 SerialDiscrete PDF
07 1 SerialDiscrete PDF
Session 7
Objectives
• The student will correctly identify:
• Which functions to use to read from and write to discrete channels
• Which functions to use to read from and write to a serial port
• The student will correctly explain what Online & Offline mean,
and list the 4 conditions that can affect whether In-Sight is
Online or Offline
7-2
In-Sight I/O Expansion Modules
In-Sight Breakout & Expansion Modules
Outputs
Model Inputs General PoE Serial
High Speed
Purpose
Micro and 5000 0 0 2 N/A Yes *
7000 3 0 4 No Yes
CIO 1400 7 6 2 No Yes
CIO 1450 8 8 2 No Yes
CIO MICRO 8 8 2 Yes Yes
CIO MICRO CC 8 8 2 Yes Yes
7-3
Discrete Inputs
Configured under SensorDiscrete I/O SettingsInput Settings
7-4
Loading a Job File
In order to use this functionality you must save job(s) with a numerical prefix
before (or as) the name.
1. Set at least one Input Line’s Signal Type to Job ID Number.
2. The Job ID bit is a binary coded number. Lowest line number is least
significant bit (LSB). Job ID lines must be next to each other. Example -
000 = 0 ; 011 = 3; 101 = 5
3. Select an Input Line to configure and set the Signal Type to Job Load
Switch. The job file that is loaded is indicted by the state (0 or 1) of any
other Input Lines set to Job ID Number at the time of the Load Switch
signal.
7-5
Type of Inputs: User Data
User Data setting is used for reading digital input into
spreadsheet in conjunction with the ReadDiscrete tool
• Event
New reading of input line(s) occurs only when specified event occurs
• Start bit
Number of the first input line to read (0 - 7)
• Number of Bits
Number of lines to read (1 - 8)
7-6
ReadDiscrete Example
Example: Each time an image is acquired, read discrete input line 1
Configure Line 1 as
User Data type
7-7
ReadDiscrete Example
Each time image is acquired, the
ReadDiscrete tool and its
accompanying MultiStatus
(automatically inserted) will change as
follows:
7-8
Discrete Outputs
Configured under SensorDiscrete I/O SettingsOutput Settings
7-9
Details Dialog
• Depending on the Type chosen the details dialog offers
additional settings Job Completed
Programmed
All Others
Strobe 7-10
Types of Output: Programmed
Programmed setting is used for writing digital output from
spreadsheet by using the WriteDiscrete tool
Writing 0
Writing 1
7-11
Serial Port Settings
Configured under SensorSerial Port Settings
7-13
Native Mode
Special ASCII commands sent to In-Sight from another
device (computer, PLC, etc.) over a serial or network
line
They can
• Control In-Sight
Ex: Go online; open a job
7-15
Motoman, Kuka, and Unused
Motoman: Protocol for communicating
with Motoman MRC, MRC-II, and XRC robot
controllers operating in DCI mode.
Kuka: Protocol for communicating with
Kuka KR C2 and KR C2 Edition 2005 robot
controllers.
7-16
The Event Function
• The Event function behaves similarly to the AcquireImage and
holds a value of one when activated
• You can choose the trigger that will activate an Event
• All cells that depends on said Event will be updated (independently
of image acquisition)
• For example:
When a pulse occurs on discrete input line 0 the Event
can be used to update those portions of the spreadsheet that
depend on the Event instead of using the image acquisition
cell (A0)
7-17
Other Event Triggers
Conditions
• Discrete Input
• Manual Acquisition Trigger
• Online/Offline state of system
• Job Load Done
• Soft 0-7: Programmable in software
Error conditions
• Acquisition Error (missed Camera Trigger)
• Discrete I/O Error (tracking pulse overrun)
• Serial Port Error
7-18
Online vs. Offline
Online means that all In-Sight I/O
(discrete, serial, network, and
non-manual triggers) is enabled
7-19
Online vs. Offline
When ONLINE… When OFFLINE…
2. Toolbar
7-21
Reminder about I/O
• Keep in mind what the I/O needs for write values:
• Discrete – Integer
• Serial – String
7-22
Summary
• Serial communications:
• 1 serial I/O port
• Send/receive data with WriteSerial &
ReadSerial, set Mode = Text
• Also used for Native Mode,
DeviceNet, Kuka & MotoMan
• Discrete I/O:
• Additional inputs and outputs,
depending expansion module
• Read state using ReadDiscrete, set
line Type = User Data
• Set state using WriteDiscrete,
set line Type = Programmed
7-23
Summary
• Four ways to go online or offline. If
one way says offline, it overrides
another saying online
7-24