MELSOFT Library

FB for data operation (English)

This FB library is for data operations of the programmable controller CPU module.

Applicable
model
Q02CPU, Q02HCPU, Q06HCPU, Q12HCPU, Q25HCPU
Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCPU, Q03UDCPU, Q04UDHCPU, Q06UDHCPU, Q10UDHCPU, Q13UDHCPU, Q20UDHCPU, Q26UDHCPU, Q03UDECPU, Q04UDEHCPU, Q06UDEHCPU, Q10UDEHCPU, Q13UDEHCPU, Q20UDEHCPU, Q26UDEHCPU, Q50UDEHCPU, Q100UDEHCPU
L02CPU, L26CPU-BT, L02CPU-P, L26CPU-PBT
File name Size Last update Version
cpu-data_v100a_e.zip 2,688,307 bytes Apr. 1, 2011 1.00A
Relevant manual Type
FBM-M047-A DATA OPERATION FB LIBRARY REFERENCE MANUAL
FB name Function name Description Ver.
M+CPU-Data_CalculateCheckCode Check code calculation Calculates the horizontal parity value and addition value (sum), which are used to check for errors in communication. 1.00A
M+CPU-Data_CalculateCRC16 CRC-16 calculation Calculates CRC-16 (Cyclic Redundancy Check) value, which is one of the error check methods used for communication. 1.00A
M+CPU-Data_CopyDigit Digit copy Copies 16-bit data by digits (4 bits per digit). 1.00A
M+CPU-Data_DSwap 32-bit upper/lower byte exchange Exchanges the upper/lower 8-bit of the input data (32-bit data) in word units. 1.00A
M+CPU-Data_RShiftBit Bit right shift Shifts the word device data to the right by the specified number of bits. This FB transfers the data to be stored in the shift result from the most significant bit of the shifted data by the specified number of bits. 1.00A
M+CPU-Data_LShiftBit Bit left shift Shifts the word device data to the left by the specified number of bits. This FB transfers the data to be stored in the shift result from the least significant bit of the shifted data by the specified number of bits. 1.00A
M+CPU-Data_RShiftWord Word right shift Shifts the word device data to the right by the specified number of words. This FB transfers the data to be stored in the shift result from the most significant word of the shifted data by the specified number of words. 1.00A
M+CPU-Data_LShiftWord Word left shift Shifts the word device data by the specified number of words to the left. This FB transfers the data to be stored in the shift result from the least significant word of the shifted data by the specified number of words. 1.00A
M+CPU-Data_SortArrayData Data sort Sorts the data table, which consists of lines and columns, by lines in ascending or descending order based on a specified column. The data table stores consecutive values (16-bit data) in columns. 1.00A
M+CPU-Data_DSortArrayData 32-bit data sort Sorts the data table, which consists of lines and columns, by lines in ascending or descending order based on a specified column. The data table stores consecutive values (32-bit data) in columns. 1.00A
M+CPU-Data_SortArrayData2 Data sort 2 Sorts the data table, which consists of lines and columns, by lines in ascending or descending order based on a specified column. The data table stores consecutive values (16-bit data) in lines. 1.00A
M+CPU-Data_DSortArrayData2 32-bit data sort 2 Sorts the data table, which consists of lines and columns, by lines in ascending or descending order based on a specified column. The data table stores consecutive values (32-bit data) in lines. 1.00A
M+CPU-Data_CheckBitStatus 16-bit ON/OFF check Checks the ON/OFF status of the specified bit position of 16-bit data. 1.00A
M+CPU-Data_DCheckBitStatus 32-bit ON/OFF check Checks the ON/OFF status of the specified bit position of 32-bit data. 1.00A
M+CPU-Data_SeachSameMaxMinData Data search Searches for the identical data and maximum and minimum values in consecutive data area (16-bit data). 1.00A
M+CPU-Data_DSeachSameMaxMinData 32-bit data search Searches for the identical data and maximum and minimum values from the consecutive data area (32-bit data). 1.00A
M+CPU-Data_CalculateSquareRoot Binary data square root calculation Calculates the square root of the input binary data (16-bit data). 1.00A
M+CPU-Data_DCalculateSquareRoot 32-bit binary data square root calculation Calculates the square root of the input binary data (32-bit data). 1.00A


[Precautions for using the file]

  1. Install the FB library to the personal computer in which GX Works2 (English) of Version 1.31H or later has been installed.


[How to extract the compressed file]

Copy the file to a folder.
After the copied file is decompressed, the cpu-data_v100a_e folder is created.

Decompression method 1): For the OS with the ZIP-compatible decompression function

  1. Right-click the copied file.
  2. Select "Extract All...".
    When "Extract All..." is not displayed, follow the decompression method 2).
  3. Specify the location of the extracted file, and click the "Extract" button to start the decompression.

Decompression method 2): For the OS without the ZIP-compatible decompression function

  1. If not having the ZIP-compatible decompression tool, acquire the decompressing tool.
  2. Decompress the file using the decompression tool.

* Use the decompression tool at users' own risk.


[Installation method]

  1. Execute setup.exe in the cpu-data_v100a_e folder.
  2. Install the FB library following the messages of the installer.


[How to use MELSOFT Library]

  1. Select [Library] - [Install...] from the [Project] menu.
  2. In the [Import Library to Project] dialog box, select the installed library and necessary FBs, and click the [OK] button.
  3. Paste the FB from the [Element Selection] window to the program.


[Precautions for using MELSOFT Library]

  1. Before applying the FB library of MELSOFT Library to a system, check sufficiently if no problem occurs in the control of the system.