Ttl input events, Serial communications port 1 input – Industrial Data Systems IDS Scale Basic User Manual

Page 45

Advertising
background image

Scale Basic 4.2E

Reference

Flag on, 1

turn on flag 1

Relay on, 1

turn on relay 1

End

if

End

if

This example will cause relay output 1 to continuously turn on and off in 0.2 second intervals.

TTL Input Events

Purpose: execute a scale basic function when a TTL input is activated (shorted to ground).

Remarks: TTL inputs 1 through 4 execute scale basic functions 1 through 4. The TTL inputs

trigger when the input signal goes from TTL high to TTL low. The TTL input will not re-
trigger until the TTL input returns to TTL high. NOTE: TTL inputs must be enabled by
setting parameter 39 = 1.
The automatic scan of TTL inputs 1 thru 4 is useful for events that must be constantly
monitored such as a STOP switch used in bulk weigh or an overload limit switch. For
conditions where the TTL input is monitored on a temporary basis (such as a GO switch) use
the ability of the Setpoint Monitor to trigger on a condition code.


TTL input 6: Pulse Count Input - TTL input 6 is scanned for signal pulses. The maximum

pulse rate is 450 pulses / second, each pulse must be low a minimum 1.1 ms, and high a
minimum of 1.1 ms. The pulses are accumulated in the Count register [57]. Each second,
the number of pulses that occurred in that second is stored in the Rate register [55]
(pulses/second).


Events - Serial Communications Input: Port 1 & Port 2

Serial Communications Port 1 Input

Purpose: receive data input.
Remarks: port 1 receives data into a buffer until an ACCII carriage return (13) is received. The

condition code, Barcode, is set true when a message is received. The data is copied to a
message buffer where it is held for the next data input command. Data input commands
include any command where the operator would key in data and then press the Enter key.
This includes ID number entry and Get data [r] instructions.


Example1: a bar code reader is connected to Port 1. The operator presses the F1 key which

activates function 1.

Fn. 1

Gosub, Open new

open an ID or make new if not found

Copy Id2, Gross

Id2 (the ID’s tare register) = weight on the scale

Gosub Close id

Save ID data to memory

End

End

of

function

Using this program, the operator presses the F1 key. The

indicator prompts “Id”. The

operator scans a bar code label. The bar code data is used for the ID number.

Advertising