FactoryLogix Learning

Mirtec queries to configure xLinks

KB ARTICLE

Overview

The following SQL queries are used to retrieve inspection data from a Mirtec database for the purpose of configuring FactoryLogix xLink integrations. These queries require a PostgreSQL database connection to the Mirtec database, established using pgAdmin.

Prerequisites

  • pgAdmin is installed and configured with a connection to the Mirtec PostgreSQL database.

  • The FactoryLogix xLink integration is licensed and configured.

Board and module inspection results query

This query returns board-level and module-level inspection results, filtered by inspection end time. Update the date/time value in the WHERE clause as needed:


SELECT
  customer_board_result_view.inspect_seq,
  customer_board_result_view.board_id AS ContainerBarcode,
  customer_board_result_view.model_id,
  customer_board_result_view.side_id,
  customer_board_result_view.inspect_start,
  customer_board_result_view.inspect_end,
  customer_board_result_view.operator_id,
  customer_board_result_view.result,
  customer_module_result_view.barcode AS ImageBarcode,
  customer_module_result_view.module_id
FROM
  public.customer_board_result_view,
  public.customer_module_result_view
WHERE
  customer_board_result_view.inspect_seq = customer_module_result_view.inspect_seq
  AND inspect_end > '2013-07-02 15:20:45'
ORDER BY
  customer_board_result_view.inspect_seq ASC;

Part and window inspection results query

This query returns part-level and window-level inspection results for a specific inspection sequence. Replace xxx with the target inspect_seq value:


SELECT A.part_id, A.module_id, A.part_number, B.result, B.user_defect_id
FROM customer_part_result_view AS A, customer_window_result_view AS B
WHERE A.part_seq = B.part_seq AND A.inspect_seq = xxx;