Categories
Uncategorized

Instructions of instruction presentation Sherlock (Sherlock Version: 7.2.5.1 64-bit)

Instruction Set Overview

            

 

1、General   

1), Comment :: comment instruction.

2), Image Window: to create a new image window. True: After taking like to update the image window display; False: do not update the image window when there is a new image. Returns true if successful imaging.

             

3), Return: process instruction “Return.” Inserting a return from a subroutine.

4), Subrotine: create a subroutine.

5), Test: assessment statement.

2, Array: Boolean (Boolean array instruction)

With “Array: Number (integer array command)”

 

 

 

 

 

 

 

 

 

3, Array: Line (linear array instruction)

With “Array: Number (integer array command)”

 

       

 

 

 

 

 

 

 

4, Array: Number (integer arrays instruction)

1), AbsoluteValue: absolute value, array = | array |.

2), Add / Subtract / Multiply: two arrays summing / differential / volume, array = array_1 (+ / – / *) array_2.

3), Append: Adds the specified element to the end of the array.

4), AppendRep: the specified element in the n-th end of the array.

5), ClipHigh / ClipLow: the array of> = / <= threshold="" value="" into="" alternative="" above.<="" p=""/>

                  

6), Concatenate: to merge two arrays.

    7)、ConstMulAdd: array = intput_array * mulConst + addConst。

                  

8), CopyArray: copy all or part of elements of the input array into a new array.

9), Correlate: two digital array and associated output generated by the Pearson correlation coefficient. If the size of two different arrays, use the smaller size of the array.

                                   

Pearson correlation coefficient (Pearson Correlation Coefficient) is used to measure whether the two sets of data in a line above, which is used to measure the linear relationship between the variable spacer. Range is -1 to 0 indicates no correlation or error.

Pearson correlation coefficients using the following equation:

                                     

Wherein, X is the value of array_1, Y is the value of array_2. Band horizontal X and Y are the mean of the array.

10), Create: to create a new array contains n elements and is initialized to 0.

11), CreateInf: Creates a new array with the values ​​passed.

12), CreateRep: Creates a new array contains n elements and the value of all initialized specified.

13), Difference: the array_1 array_2 but contains no new elements to the output array.

14), Erase: delete the element at the specified index.

15), EraseRange: remove elements within the specified range of indexes.

16), Extrema: maximum and minimum input returns the array and the corresponding array index.

17), GetAt / SetAt: Get / set value of the element at the specified index.

18), GetRange: the output is a new array that is a subset of the input array, comprising Count element starting from the index.

It contains an element index. If the requested too many elements, only the number of available returns without signaling an error. In other words, if the size is smaller than the first array (index + count), the resulting array may be less than COUNT, and the function returns no error.

19), SetRange: the elements in the specified index range is set to a constant.

option allows wrap leaving the range of values ​​around the end of the array and the beginning of the array, as the array as a circular rather than linear. For example, it helps to suppress the maximum curvature found (using Array: Number: Maximum), in order to find other maximum (angle) on the object.

19), Insert: shifting a specified index after inserting a new value, and the index of the element behind.

20), InsertRep: n elements inserted at the specified index, and all assigned the specific value.

21), Maxinum / Mininum / MeanAndVariance: Returns the maximum elements in the array, the minimum, mean, variance and standard deviation.

23), Resize: adjusting the length of the array to a specific length, deletion or addition of elements required.

24), Reverse: The reverse elements in the array output.

25), Size: returns the length of the array.

26), Smooth: smoothed value of the input array, similar to the shape of the Gaussian filter. (What does it mean ?? did not understand)

27), Sort: the elements of the array ascending (default) or descending order.

29), Threshold: values ​​in the array will> = threshold is replaced above, replace the other below.

30), ThresholdBand: see arrays> = high threshold value is replaced above,

 

5, Array: Point (points set of instructions)

1), Remove Isolated Outliers: Delete does not belong to a measure of the maximum distance between the point of the cluster.

                

The maximum distance between two neighboring points each before and after the input point and its function in the calculation of points. Then, based on “Tolerance” set of distance values ​​to clustering. Enter the point is not the largest cluster (group) is deleted and placed in the output of “bad points” array. The remaining point return “good points” output array. This can well remove a small group of input points isolated “noise” point, but if much noise exists point ineffective, since the noise points may form the largest clusters (groups).

   

The other with “Array: Number (integer array command)”

 

 

 

 

6, Array: String (instruction string array)

With “Array: Number (integer array command)”

 

 

 

 

 

 

 

 

 

7, Boolean instruction set

1), AND / OR / NOT: and or.

2), SetBoolean: Boolean value (output value) is set to the specified value.

3), XOR: exclusive OR, if an odd number of inputs is true, then true.

 

8, Geometric instruction set

1), ADToLn: The (a distance from the origin to the arc and a straight line from a) to determine a straight line.

2), AngleBisect: angle bisector (from point to point point1 point2 straight line and a straight line from point to point point3 point2) is calculated between the point at the intersection of the two lines point2.

3), AngleNormalize: angle transforming into a -π / 2 ~ π an angle in the range of 2 /.

4), CircleBoundingBox: seeking four corner points of a circumscribed circle of the square (upper left, lower left, upper right, lower right)

5), CircleInTriangle: seeking an inscribed circle of a triangle.

6), CircleLineIntersect: seeking a straight line and a circle of intersection and the number of angular coordinates.

7), Convex Hull: Returns a set of convex hull points.

8), Curvature: demand curve segment (represented by the set) curvature.

9), Curvature-Hole: seeking a closed curve curvature section, and sets the curvature of the curve points marked.

10), LnNormalize: linearly forced into the slope between * Pi ~ + 1/2 * Pi -1 / 2, making it a standard straight line.

11), LnParallel: too little seeking straight line parallel.

12), LnPerpendicular: too little demand a vertical line.

13), LnsBisect: seeking the angle bisector of two lines.

14), LnSet: a straight line to the line type assigned to a variable.

15), LnsIntersection: find the intersection of two straight lines.

16), LnToAD: the slope of a straight line and distances extracted.

A represents a straight angle; D represents the distance from the origin to the line, a straight line over the origin is negative, is positive downward, as shown.

                                    

And a straight line represented by the equation d: y = tan (a) * x + d / cos (a).

17), LnToLnAngle: the angle between two straight lines.

18), LnToLnDist: the distance between the two straight lines and an intersection of the third line is the distance between P1 and P2.

19), MakeAnchor: seeking a point (P1) in one direction, two symmetrical points (P1 ‘/ P1’ ‘) at the same distance (dist) is.

20), PtAverage: find a midpoint point set of all points.

21), PtAverageInf: find the midpoint of a given set of points.

22), PtMiddle: find the midpoint of the two points.

23), PtRotate: one point to another point of rotation about a fixed angle, the point obtained after rotation.

24), PtSet: a point to point type is assigned to a variable.

25), PtsToBestAngle: the angle between a straight line through two points of the image of the X-axis.

26), PtsToBestCircle: by a group of points set point fit a circle.

27), PtsToBestCircleInf: through a given set point fit a circle.

28), PtsToBestLine: fitting a straight line through a point in the group set point. Returns the number of points used in the fitting and arrays, arrays, and discarding linear fitting point.

                 

“Percent outliers” -> outliers discarded as a percentage points.

“Proprecess” -> If true, use the Remove Isolated Outliers as a pretreatment.

“Tolerance” -> acceptable point of maximum distance from the ideal point to worst. It must be greater than zero.

29), PtsToBestLnInf: through a given series of points fit a straight line.

30), PtsToBestLnMaxOut: fitting a straight line through a point in the group set point. Allows discarding outliers specified percentage to improve fit straight line. Returns the number of points used in the fitting, the drop threshold array, linear nearest and farthest points and fitted line.

                  

31), PtsToLnDist: straight line distance to a point within an array.

32), PtsToLnDistInf: specify a series of points to a straight line distance.

33), PtsToPtsDist: a set of points from the set point to another.

34), PtToLnDist: distance from a point to a line.

                    

“Measurement point” -> pedal coordinates.

“Measurement line” -> vertical.

35), PtToPtAngleDist: seek distance and angle with the X axis of the fitting points between two points.

36), PtToPtDist: one point to another point in the distance, the distance X and Y.

37), PtToPtsDist: distance from a point to a set of points, distance of X and Y.

38), PtToPtsDistMinMax: distance from a point to a set maximum distance and the minimum point.

39), RakeLineFit: fitting a straight line through the points Rake ROI.

                     

“Linear tolerance” -> pharmaceutically maximum distance from point to point over the worst, i.e. linear tolerance value. It must be greater than zero.

“Angular tolerance” -> From the point over the maximum angle to the worst acceptable point, i.e., the angle tolerance value. It must be greater than zero.

This function deletes passed three times to refine outliers.

First check the distance between a point and its two neighboring points before and after. If the linear distance is greater than the tolerance value, then the point is removed. This applies to isolated “noise” point, but not for outliers packet.

Second check the angle between each successive point and the first point in the array. If the angle is greater than the angle tolerance value, then the point is removed. The first two points must be located on a line of “good” data. If the group is small, and most of the points on a line in the desired, can better remove outliers grouped together.

Finally, a third examination each angle point and continuous between the previous point, working backwards. If the angle is greater than the angle tolerance value, then the point is removed. The last two points must be located on a line of “good” data. And second, as if the group is small, and most of the lines in the desired point, it may be more effectively removed outliers grouped together.

This formula applies to the isolated “noise” point, is also applicable to the group of points which form a small number of sampling points. Group closer to the desired line, the angular tolerance is impossible to remove them all (smaller angle). It should be removed to form deep, narrow point of the recess or punctured. It may not completely remove the wide and shallow recess.

40), PtToXY: seeking a point X / Y coordinates.

41), TwoPtsToLn: fitting a straight line with the two points.

42), XYToPt: a point fitting with X / Y coordinates.

 

9, IO: Annotations (image display instructions)

1), Circle / Circles: draw a circle in the image / series of constant radius circle.

2), Line / Line Segment: draw a line in the image / segment.

3), Pixels: In some image pixels marked.

4), Point / Points: a draw / set of points in the image.

5), Polyline: draw more than one line (broken line) in the image.

6), Rectangle: draw a rectangle in the image.

7), Text: displaying a text in the image.

 

10、IO: Calibration

1), Calibrate Using a Grid: recalibration using a grid. This allows the execution of the target instruction or the grid from a custom front-end calibration. Previously available only grid or calibration target from the GUI interface.

From the GUI interface is set as follows:

             

Perform trellis calibration procedure:

                  

2), Calibrate Using Point Arrays: using a series of calibration points. Distribution calibration system. Select 4 input points, and provide world coordinates. You should have identified or created four points in the image window.

3), Calibrate Using Points: using the input calibration points. Distribution calibration system. Select 4 input points, and provide world coordinates. You should have identified or created four points in the image window. In the program window can be dragged to the calibration input points.

4), Calibrate Using Transformation Values: conversion value used for calibration. Dispensing calibration system provides axis coordinate origin and scale factors (multiplier).

5), Load Calibration: load a previously saved calibration data file. May [(double-click to open a window image) by the image window options] or from the instruction -> [Calibration] Export (save) the calibration data.

Note: This calibration data is used only in the same camera, the same lens, the camera position and when the same object with the same distance from the target efficiently. If a change in any of these factors, the calibration data is invalid.

6), Pixels To World: the position of the point from the pixel coordinates into world coordinates (or coordinates calibration).

7), Save Calibration: The calibration data to a file.

8), Set Identity Calibration: 1 to 1 set (identification) calibration, this function will return the measured value to the pixel value, “Cancel Calibration” calibration system.

9), World To Pixels: the conversion from the world coordinate position (coordinate calibration) of the pixel coordinates.

 

11, IO: Camera (camera parameter setting instruction set)

1), Flush acquired images: Clear all camera buffer image acquisition.

2), Get bool / number / string feature: Returns a Boolean camera / digital / feature string. Returns the current value [Boolean] type of camera functions. Available functions and their values ​​defined by the camera manufacturer. (I did not understand what it meant, should be the parameters of the camera itself)

3), Set bool / number / string feature: Boolean Set camera / digital / string feature.

4), Get camera count: the number of cameras connected to the detection system.

5), Get missed frame count: return since the beginning of the current collection of lost frames.

6), Get number of acquired lines: Returns the number of lines acquired by the camera. This directive applies to the line scan camera, to return the number of lines acquired at a variable frame mode.

7), Halt camera ACQ: Stop camera collection.

8), Read register: register read by the camera.

9), Send command: write a command string to the camera.

10), Set Brightness: Set the white balance. Typically range 0-100, but the actual value is defined by the camera manufacturer.

The directive applies to PIC-2592 camera. If Sapera network driver in “Using Teledyne DALSA Interface” mode, this directive applies to Genie series of cameras, but not for Genie TS series cameras or other.

11), Set Lut: Set the camera look-up table (Look-Up Table).

12), Set Shutter: Set the exposure time.

13), Set Trigger Delay: gripping member is provided and the delay between the sensor triggers the camera trigger signal is issued.

14), Write register: To register a camera inside the write value.

 

12、IO: ControlLogix

ControlLogix system is based on the rack system may be used to provide sequential control, process control, motion control and drive control system controlling the option configuration, may provide a communication I / O functions.

NOTE: Options must previously [] -> [IO] -> [] Control Logix controller and handle defined variables.

1), Read / Write: ControlLogix controller read from / write single value. Available for string type. Number is interpreted as a byte, word, double word, or real number values.

2), Read Array / Write Array: the controller reads from / writes a set value. Available for string type prefix length. Number is interpreted as a byte, word, double word, or real number values.

3), Read Bool / Write Bool: the controller reads from / writes a Boolean value.

4), Read Bool Array / Write Bool Array: the controller reads from / writes a set of Boolean values.

5), Read String / Write String: reads from controller / write single string.

6), Read String Array / write String Array: the controller reads from / writes a string array.

 

 

13, IO: Digital Input (IO input of instructions)

1), Get input IO count: Gets the number of IO input port.

2), Read: reading an IO port states.

3), Read Array: read the status of the IO input port set.

4), Read Decimal: read the status of all primary input port IO. The maximum number of 32 channels.

5), Wait For Pulse: waiting for a pulse signal input port IO.

6), Wait For State: IO wait for a signal input port of the norm.

 

14, IO: Digital Output (IO output signal of instructions)

1), Advanced IO: Enqueue Decision: arrangement Advanced I / O (AIO) decisions. It must exist and enable advanced I / O capabilities. High I / O is VA21, VA31, VA40, VA41 and NetSight II-MCA hardware features. Does not apply to other hardware.

            Parameters: “Decision” -> Pass(0),Fail(1),Recycle(2)。

If available, use the IFC Camera Configurator to configure advanced I / O hardware and timing. Camera Configuration parameters are stored in the file.

2), Advanced IO: Initialize Queue: Initial arranged I / O decisions. It must exist and enable advanced I / O capabilities. High I / O is VA21, VA31, VA40, VA41 and NetSight II-MCA hardware features. Does not apply to other hardware.

If so, use the IFC Camera Configurator to configure advanced I / O hardware and timing. Camera Configuration parameters are stored in the file.

3), Async Pulse: pulse output asynchronous. The output “channel” is set and “state” opposite. Waiting “time” Time (in ms), and then outputs “channel” is set to “state”. Sherlock next instruction after the execution Async Pulse, without waiting for the completion of the instruction execution or pulse.

                                                                    

4), Get output IO Count: acquiring the number of IO ports.

5), Pulse: the output “channel” is set and “state” opposite. Waiting “time” Time (in ms), and then outputs “channel” is set to “state”. Wait instruction is completed before Sherlock pulse to the next instruction after the Pulse.

6), Read: read the status of the IO output port.

7), Read Array: a plurality of state output ports IO-time reading.

                    

For index N set at any of the elements 1 (True) channels of the array, read the corresponding N digital output channels, and writes the value to the channel states of the N array index.

For channels in the array is set to 0 (False) elements, the corresponding position in the array states are set to zero (False). These positions should be ignored, since they do not reflect the state of the corresponding output channels.

8), Read Decimal: a one-time read the status of all output ports IO (maximum of 32 channels).

9), Schedule Async Pulse: an asynchronous pulse output arrangement.

In contrast to the channel, after the channel length of the channel is provided while waiting delay (in ms) and the state of state, to wait for a long time after the channel setting time (in ms) to the opposite state. Without waiting for the next pulse output occurs when Sherlock execute a statement.

10), Write: write the state of the output channel.

11), Write Array: the write-once state of the plurality of IO ports.

For any setting element at index N 1 (True) of the channels in the array, the digital output channels N is written to the state at N States array index corresponding values.

For example: The following array will write channel 2,1 0 write channel 3, channel 0 and 1 write values, since ‘channels’ is 0.

                                     

12), Write Decimal: all the write-once digital output (maximum output of 32 channels).

‘Value’ -> written to digital output port 10 decimal (or hexadecimal) numbers. This value is reinterpreted as a bit pattern, and written to the digital output channels. lsb (least significant bit) output channel is always 0.

 

15、EtherNet/IP

EtherNet / IP is an industrial Ethernet protocol developed by the RockWell, is part of the Common Industrial Protocol (CIP) is. IP is the Industrial Protocol (Industrial Protocol) is short for Internet Protocol, and it does not matter.

NOTE: Before executing instructions or run once (at least once), the communication does not initialize EthernetIP. If the instruction has not been executed, PLC software will not run Sherlock access system. Alternatively, you can start EthernetIP Communications Server automatically at startup Sherlock. Set in the following path: Menu Bar [Options] -> [Application] -> [Advanved] -> [EthernetIP: start EthernetIP server on Sherlock startup].

1), Read: reading a set of values.

2), Write: write a set of values.

 

16, IO: File (document instruction set)

1), Append: additional content into the document. The next write will not overwrite the previous content.

2), Close: Close a document open.

3), Open: open a document.

4), Read: read the document (already open) content.

5), Write: write content to the document. Overwritten before the next write will.

 

17、GE Fanuc

GE (General Electric Company, GeneralElectricCompany) and FANUC (Japan FANUC) joint venture in China is currently the main sales PLC (90-70 / 90-30) and software (Intellution, IFix / Fix).

Note: you must first [Options] -> [IO] -> [menu] GE Fanuc controllers defined.

1), Read: reading values ​​from a single controller.

2), Read Bool: reading a Boolean value from a single controller.

3), Write: write individual values ​​to the controller.

4), Write Bool: single Boolean value written to the controller.

 

18, IO: Image Window (image window set of instructions)

1), Clear Image Log: Clear log or image sequence.

2), Copy to Cipboard: Copy the image to the clipboard.

“Graphics” -> 0: Only copy images, graphics, and without notation; 1: copy the image with graphics and annotations.

3), Enable image Logging: Enable / disable the image log.

The image attribute parameters are defined in the image window, the other parameters can not be modified by the instruction.

4), Get FTP Image Logging Status: acquiring an image window FTP logging state.

This report FTP subsystem function when you call the state (because FTP client independent of the program [ivs] actuators work), but it should be accurate enough to capture the most important issues.

                 

“Tfp log active” -> If this window is enabled FTP image logging was TRUE.

“Error” – a FTP error description> on.

“Failed upload” – a failure of the upload file> on (if any).

“Queze size” -> the number of images queued to upload, or -1 if there is no information available.

“Last queued” -> File last queued. Finally, the file queue.

“Response” -> FTP server response (if available).

“Last result” -> successful returns TRUE, otherwise it returns False.

5), Get Image Attributes: acquiring an image size (in pixels) and the number of bytes per pixel.

6), Get Image Source: Description output image source selected image window string.

7), Load Image: load an image file.

8), Log Image: recording an image, or save the images to “image log” sequence of image files.

Note: Do not use the recommended operating system and the same drive partition (usually the C: drive) to record an image. Windows NTFS file system boot sector defects can cause damage when the continuous file (e.g., image) into the operating system partition.

9), Refresh: refresh the image window.

10), Reset Image Log: a log index reset image logs, the log index is set to zero digit. (Optional) can refresh the image queue.

11), Save Image: Save the image to the specified file.

12), Save Image with Graphics: Save the image with graphics and comments to a file.

13), Save Image with Graphics to Buffer: The coverage pattern with a given image window saved to the “temporary” buffer.

14), Set Camera: Specify the camera image window (if acquisition hardware supports multiple cameras words).

15), Set External Trigger: Set the camera to an external trigger mode.

16), Set Palette: Palette provided a method of displaying a monochrome image.

Select predefined palette or alternatively custom color palette. Custom palette containing the input element method requires a set of 256 elements, or an error will occur. Size of the array should be exactly 256 elements, but if greater, the index is ignored after 255 and generates a warning. Smaller array will generate an error. All methods are ignored except Custom palette of the input array.

17), Start Camera Acquisition: from the selected source starts moving image capture.

 

19、IO: Keyboard

1), Test any key: Test any key. If any key is pressed (or predefined bindings shortcuts / accelerator key excluded) during execution of this instruction, the output “keypress” is true. If “keypress” is false, the key code “keycode” is false.

2), Test one key (number) / Test one key (string): test a particular key. If the key is pressed with a given key code matching during execution of this instruction, the output is true. KeyCode is a Windows virtual key code.

 

20、IO: Melsec FX/Q/Tcp

Mitsubishi MELSECNET its product development dedicated data link system.

1), MC FX serial read word: read word from a serial protocol device.

This instruction uses the format 1 and 4 to achieve Melsec-FX protocol.

Must be properly configured PC serial port (baud rate, data size, parity) arranged to match Melsec PLC. The other parameters of the instruction must then be arranged to coincide with the Melsec PLC.

2), MC FX serial write word: write word using a serial protocol from the device.

This instruction uses the format 1 and 4 to achieve Melsec-FX protocol.

Must be properly configured PC serial port (baud rate, data size, parity) arranged to match Melsec PLC. The other parameters of the instruction must then be arranged to coincide with the Melsec PLC.

3), MC Q serial read word: read word from a serial protocol device.

This instruction uses the frame format 4C and 5 (binary communication) protocol implemented Melsec-Q.

Must be properly configured PC serial port (baud rate, data size, parity) arranged to match Melsec PLC. The other parameters of the instruction must then be arranged to coincide with the Melsec PLC.

4), MC Q serial write word: write word using a serial protocol from the device.

This instruction uses the frame format 4C and 5 (binary communication) protocol implemented Melsec-Q.

Must be properly configured PC serial port (baud rate, data size, parity) arranged to match Melsec PLC. The other parameters of the instruction must then be arranged to coincide with the Melsec PLC.

5), MC tcp read word: using TCP / IP protocol word read from the device.

6), MC tcp write word: using TCP / IP protocol write word from the device.

 

21、IO: Modbus Master/Slave

Note: You must now [Options] -> [IO] -> [] defined in Modbus Modbus devices.

1), Read Multiple Discretes: reading a plurality of discrete input or output.

2), Read Multiple Registers: reading values ​​from a plurality of registers.

3), Read single Discrete: reading a single discrete input or output.

4), Read Single Register: register value read from.

5), Write Multiple Ciols: an array of values ​​written to the plurality of coils. (Coil (Coil) is what the hell ????)

6), Write Multiple Registers: an array of values ​​written into registers sequentially.

7), Write Single Coil: write values ​​to a single coil.

8), Write Single Register: the value written into the register.

9), Read Discrete: reading a single discrete input or output.

10), Read Register: register value read from.

11), Write Discrete: writing a single discrete output.

12), Write Register: The value written into the register.

 

22、IO: Omron Ethernet/Host Link

1), UDP read word: read word from UDP protocol device. The instruction word read values ​​1-70 from the data area (DM area) on a Omron PLC.

Note: 1) must be in the [Options] – Connections> [Udp / Ip] defined Ethernet -> [IO].

2) before executing the instruction or run once (at least once), Profinet communication is not initialized. If the instruction has not been executed, PLC software will not run Sherlock access system. Alternatively, you can start EthernetIP Communications Server automatically at startup Sherlock. Set in the following path: Menu Bar [Options] -> [Application] -> [Advanved] -> [EthernetIP: start EthernetIP server on Sherlock startup].

2), UDP write word: UDP protocol write word from the device.

3), Serial read word: read word from a serial protocol device. The instruction word read values ​​1-29 from the data area (DM area) on a Omron PLC.

Must be properly configured PC serial port (baud rate, data size, parity) arranged to match the Omron PLC. The other parameters of the instruction must then be arranged to coincide with the Omron PLC.

4), Serial write word: write word using a serial protocol from the device.

 

23、IO: Profinet

PROFINET by PROFIBUS International (PROFIBUS International, PI) introduced a new generation bus standard industrial Ethernet-based automation technology.

Note: 1) before executing the instruction or run once (at least once), Profinet communication is not initialized. If the instruction has not been executed, PLC software will not run Sherlock access system. Alternatively, you can start the Profinet communication server automatically when you start Sherlock. Set in the following path: Menu Bar [Options] -> [Application] -> [Advanved] -> [Profinet: start Profinet server on Sherlock startup].

2) Profinet communication only for 32-bit Windows environment, and not to 64-bit environment.

1), Read: reading a set of values ​​(array of numbers).

PLC output from the read value tag table, need to calculate the correct offset GEVA space (from 256). Using the index marker subtracting 256 (GEVA start address) of the number of bytes divided by element type.

2), Read String: reading ASCII string of known length.

3), Write: write a set of values ​​(array of numbers).

4), Write String: write an ASCII string.

 

24、IO: Reporter

1), Clear: Clear report.

2), Print: Print the report window.

 

25, IO: Roi (ROI set of instructions)

1), Check In Image: determination (check) the ROI is located within the image window.

2), Enable Preprocessor: Enable or disable pre-processor in the ROI. The effect of this instruction IO and check or clean side ROI processing window preprocessor same box. The preprocessor is disabled, not deleted.

3), Get Bounding Box: get ROI border point detection frame and center.

4), Get Coord: acquiring coordinates ROI (or corner elements), the number of elements and the rotation angle (angle).

          

5), Set Coord: The ROI is moved to the specified coordinate position, it is true if the refresh is redrawn.

Note: The use of the process should ensure that coordinates the use of effective, because Sherlock does not check the validity of the coordinates.

In particular, for a rectangular ROI of the target or of formula (Rake), ensure that the upper-left coordinates x / y coordinates of the lower right corner, respectively, less than x / y, otherwise it will cause the error “unable to allocate a first image buffer for extraction runtime . “

6), Get / Set Display Outline: Get / Set Properties ROI display-> outline value (chosen to be true, do not choose to false).

7), Get /Set Element Count: Get/Sets the number of elements (corner points) in the composite ROI.

8), Get / Set Rotation: get / set ROI perspective.

9), Offset: Move the ROI by the given offset value, and redraw if refresh is true.

10), Rotate: about the center point of the input ROI specified angle of rotation. This will re-calculate the coordinates of the ROI, but will not change the angle attribute ROI.

Note: Reccomputing coordinates will result in a cumulative error. Do not use this directive in a loop or in a continuous rotation.

11), Set Alignment: set the ROI justification to use. IfElse statement may be combined to achieve a different alignment of choosing in each case (Alignment), whether or alignment.

                           

12), Set Interpolate: Enables interpolation of pixel values when moving or rotating ROI. When on, bilinear interpolation is used to estimate pixel values; when off, nearest neighbor interpolation is used to estimate pixel values.

13), Set Pass / Fail Flag: by setting the ROI Pass (true) / Fail (False) flag to change the color of the contour of the ROI displayed in the image window, the image having a plurality of pointed out that to facilitate the ROI ROI which cause error. This will not cause other effects on the program.

 

26, IO: Serial (serial communication instruction set)

1), Purge Buffer: Clears the specified buffer.

Before attempting to use the serial port, the instruction will use this serial port buffer is cleared or reset to a known state. For the TX buffer, does not transmit deleted characters.

2), Receive Characters: receiving characters from the serial port. If you do not receive the minimum number of characters before the timeout, timeout.

3), Receive Line: Accepts a line of characters from the serial port. Receiving the character until the terminating character is received. If the terminating character is not received before the timeout, the timeout is.

4), Send String: String will be sent to the serial port for transmission immediately.

Note: Use ‘r’ ending string to send carriage returns, or’ n’ to send newlines.

 

27、IO: SPC

1), Get SPC values: no input parameters, output parameters are as follows:

“sample count” – the number of parts or test sample size in the SPC.

“min/avg/max/std/3std” – minimum/average/maximum/standard deviation /3* standard deviation.

“Range” – range.

“Cp/Cpk/Cllo/CPKHi/Lolim/Hilim” – Capability Index…

2), Reset SPC: SPC data reset or clear.

3), Save SPC report: Save SPC report.

 

28 、 IO: System (System instruction set)

1), Beep: sound card or speaker beeps.

2), DiskSpace: Returns the total disk space and the space.

3), Exit Application: Application closed, the program may choose to save before closing.

4), FileCopy: copy the source file to the target file.

5), FileDelete: delete the specified files, even if the specified file does not exist also said that deletion is successful, returns true.

6), FileExists: Determines whether the specified file exists.

7), FileMove: move the source file to the specified directory.

8), FolderCreate / FolderDelete: create / delete a file folder with the specified name.

9), Generate Engine Control Event: a call to create an event in VEngine Control (IpeEngCtrl.dll). The directive will create a press event handler for calling in VB / VC / C # programs.

The directive will lead to SherlockCOM engine interface generates an event “UserProgramEvent (long nEventId)”. In applications using a custom GUI Sherlock COM engine and processes the event, mixing will allow the user code and execute Sherlockprogram VB / VC / C # / (et) code.

A typical situation is:

1, Sherlock program execution IO: System -> UserProgramEvent;

2, SherlockCOM engine creates UserProgramEvent COM events;

3, UserProgramEvent COM event is called, the user code to be executed;

4, the user completes the process of UserProgramEvent COM events, Sherlockresumes execution of the program.

Note: “UserProgramEvent (long nEventId)” is useful only when the program uses SherlockCOM engine.

10), GetData / GetTime: to dd / mm / yy and hh: mm: ss format and returns the local time of the date, time 24-hour clock.

11), GetDataFormat / GetTimeFormat: returns the local date / time in the specified format.

12), GetEnv / SetEnv: Get / set the value of the specified environment variable.

13), GetvNames: Returns an array of strings with each element containing the name of an environment variable.

14), GetEnvVars: Returns an array of strings, each element including a pair of ENV_Var = String form.

15), GetMiliSecCount: ms count acquisition system. Get double millisecond timer, for timing detection.

16), GetTimeDiff: in ms returns the current time and the time difference of the specified time.

17), InputBox: displaying a dialog box, waiting for user input a character string and closed, during execution of the program is stopped.

18), Log: record a message in the application log.

19), Message Beep: Generate a system tone for the selected event.

20), Message Box: displaying a dialog box and waits for the user to close it, during program execution is stopped, the message box for the application mode.

Button return value: 1 indicates “OK”, 2 represents the “Cancel” represents 3, “suspended”, 4 indicates the “Retry”, 5 indicates “ignore”, 6 “yes”, 7 indicates “NO.”

                

             button(s): OK、OK/Cancel、Retray/Cancel、Yes/No、Yes/No/Cancel、Abort/Retray/Ingore。

             icon: Information、Warning、Question、Error。

             default button: Button1、Button2、Button3。

Note: If the remote program execution contains the message box, it will be suspended until the button is pressed on the server.

21), Pass Fail Dialog: Shows the pass/fail dialog.

                               

22), Play Wav: Play a WAV file (waveform sound file).

23), Random: randomly generating an arbitrary value of 0.00 to 1.00 Save.

24), Set error handing strategy: to define the error handling strategy by modifying the default behavior.

This directive is intended for use with the “Execution Error” subroutine and allows you to define what action to take. The default behavior without this directive is to stop the error at the end of the subroutine.

25), Sleep: Program suspended (sleep) a specified period of time (ms).

26), Stopwatch Start: Start the stopwatch at the specified index, if the stopwatch is restarted in the running.

Note: stopwatch is placed in the stopwatch start of the cycle will restart counting at each iteration of the loop.

27), Stopwatch Stop: close the stopwatch at the specified index, if the stopwatch is not running it returns 0.

 

29、IO: Tcp/Ip

1), Reveive Buffer: to accept some characters from a given connection. TCP / IP devices to be connected to or defined in advance Options-> IO in.

                  

2), Receive Byte Array: receiving a specified number of bytes and the number of them into a digital array. 0 is not a value within the range of ~ 255 are truncated removed, 256-> 0,257-> 1; negative numbers are converted into positive, -1-> 255, -2-> 254.

                                         

Note: If the number of bytes expected arrival within the timeout period, places bytes Return; the number of bytes received bytes recvd return (equal to the number of elements); and as a result returns True.

If the expected number of bytes does not arrive within the timeout period, the null bytes; bytes recvd returns the number of bytes has been received (if any); and as a result returns False.

3), Receive Line: receiving a line of characters from a given connection, until a target string.

4), Send Byte Array: an array of transmitting a byte integer. 0 is not a value within the range of ~ 255 are truncated removed.

                            

Note: only when performing an array of bytes sent server / client connection has not been established, the results will return false. This means that applications do not have a program instruction execution time actively listening arrays.

5), Send Line: a line of characters is sent to a given connection.

 

30、IO: Udp/Ip

1), Receive Byte Array: receiving a specified number of bytes from the remote host and stored to a digital array. This command allows “any” Host IP value. UDP / IP connection must be defined in Option-> IO-> UDP / IP in.

The maximum size of the string and a byte array is 1400 bytes.

2), Receive String: receiving a string from a remote host, allowing the instruction (do not care) values ​​Host IP “any.”

3), Send Byte Array: an array of integers as bytes sent over UDP to a single remote host, only the cut-off value within a range of 0 to 255.

4), Send String: the string (including the terminator) sent to a single remote host over UDP.

31, Numeric (floating-point data set of processing instructions)

1), Abs / Max2 / Min2 / Pow / Sqrt / Square: absolute value / maximum / minimum / exponentiation / root / square.

2), Add / Subtract / Multiply / Divide / Remainder: Math remainder.

3), Copy: copy the digital inputs.

4), Increment / Decrement: plus or minus 1.

5), Eq / NotEq / Greater / GreaterOrEq / Less / LessOrEq:! If n1 (= / = /> /> = /

6), Truncate / Fractional: Returns the integer / fractional part.

7), Integer Divide: two integers and returns the quotient (an integer), such as 7/2 = 3.

                        

8), Negate: returns a negative value numbers.

9), NumToString: digital converted into a string.

10), StringToNum: Returns scanned from the given string. For example: 12er345 -> 12 (true); er445 -> 0 (false).

11), Round: return to the nearest integer. For example: 0 ~ 0.5 0 (including 0.5), 0.5 to 1 return 1 (not including 0.5).

12), SetNumber: set the output to a specific value.

      

 

32, Statistics (data processing instructions)

1), Cp: return process capability index CP.

2), CpArr: Returns an array of the parameter values ​​of all the process capability index CP.

3), Cpk: return process capability index CPK (bilateral specification limit).

4), CpArr: Returns an array of all parameter values ​​of process capability index CPK (bilateral specification limit).

5), Max / Min / Mean / Variance: Returns the number for all parameters received maximum / minimum / average / variance.

6), MaxArr / MinArr / MeanArr / VarianceArr / SumArr: Returns the array parameter maximum value / minimum value of all values ​​/ mean / variance / and.

 

 

 

33, String (String instructions)

1), AddStr: two strings end to end to create a new string.

2), CharToNum: returns the ASCII value of the character channeling corresponding character value.

                  

3), CompStr: compare the size of the two strings, if String1> String2, returns 1; if String1 = String2, then return 0; if String1

4), CopyStr: copy string.

5), CreateStrInf: create a new string with the input string.

6), FindStr: (if the target is not found the search string, and returns the position of the first occurrence (if any) in the source string or -1 before). Case sensitive.

7), FindStrNth: Returns the n th position of the target string appears in the source string forward in the search, returns -1 if not found. Case sensitive.

8), FindStrReverse: reverse lookup location of the target string in the source string, returns -1 if not found. Case sensitive.

9), GetAt: returns the ASCII value of the character string at the specified index.

10), GetWordLength: obtaining the minimum and maximum length of the string word (in characters) and returns the number of words.

For example: “This is a string” minimum, maximum word length are respectively 1,6, 4 is the number of words.

11), InsertAtStr: specified index parameter string is inserted in the source string.

12), LeftStr / RightStr / MidStr: intercepting input string left / right side of n characters beginning / at the specified index to form a new string.

13), LenStr: returns the length of the string.

14), NumToChar: returns the ASCII value of the character string constructed of an array. Digital (ASCII value) into character.

15), PackStr: connecting the input character string, returns a new string.

16), PrintfNum: a digital format to a string, similar to the C language “sprintf” command.

Format:% [-] n.mf

Where, “n” represents the maximum number of characters to the left of the decimal point;

“M” represents the maximum number of characters to the right of the decimal point;

“F” represents a floating-point number;

“-” (Optional) indicates if the actual number of characters to the left of the decimal point is less than “n”, then the character string to the left.

17), ReplaceStr: the source string string specified section with the new string.

                         

18), SetAtStr: at the specified index value of the source string.

19), SetString: to string assignment.

20), TrimStr: m characters before and after the deleted n characters of the source string to obtain a new string.

34, Trigonometric (trigonometric instructions)

    1)、Sin / Cos / Tan / ArcSin / ArcCos / ArcTan

2), RadToDeg: angle into radian.

3), DegToRad: the angle is converted to radians.

4), GetPi / GetPiDiv2 / GetPiDiv4: retrieving π, π / 2, π / 4 values ​​(used internally by the application).

Leave a Reply