--------------------------------------------------------------------------------------------------------------------------
Agreement for Using the Sample (Trial)
The products are produced by extracting some of the functions of the regular version of products for the evaluation by customers.
Therefore, the products shall be provided for use as is without warranty of any kind.
Omron makes no warranty, express or implied, regarding merchantability or fitness for particular purpose of the products. Omron shall in no way be liable for any damage caused by the use or incapability of use of the products. 
Furthermore, Omron shall not provide any support for the products.

--------------------------------------------------------------------------------------------------------------------------
[K6PM] Sample program for NJ/NX series 
K6PM_SampleProgram_V0_4_0_JP.smc2

This program is a sample that collects temperature pixel data of 1024 pixels from the sensor connected to K6PM and saves it to the SD card.
(Note that the PLC task cycle is set to 4ms instead of the default 2ms.)

The function block gK6PM_Readh is a communication read program that reads EIP object data from the K6PM.

At the beginning, the program set below parameters.
  IP address (set as 192.168.250.30 in this sample)
  Number of connected sensors (1 to 10; set as 2 in this sample)
  Number of simultaneous connections (same as the number of connected sensors)
  Data collection cycle (approximate number of sensors x 5 seconds or more)
  Timeout time (EIP communication timeout time is 1 second)
  Sensor unit number

  The Sensor unit number 1 to 10 is set in the machine number variable sSensorID [0] to sSensorID [9] of 10 sensors.
  The Sensor unit number is the unit number set with the DIP switch of the sensor.
  In the sample, the number of connected sensors is two, so the data for two units, sSensorID [0] (= Unit No. 1) and sSensorID [1] (= Unit No. 2) are read.
  
  The SD card records the date and time when it was saved to the SD card, sensor status, temperature pixel data (1024 pieces), and sensor internal temperature.

--------------------------------------------------
FunctionBlock [K6PM_Read] In/Out Data
SampleFB_EN_K6PM_Read_V0_2_0.slr

Variable		I/O	DataType		Comment
Execute		In	BOOL		
IPAddress		In	STRING[256]	
TimeOut		In	UINT		Timeout (x 0.1sec)
SensorID		In	UINT		Sensor index (1~31)
Done		Out	BOOL		
Busy		Out	BOOL		
Error		Out	BOOL		
ErrorID		Out	WORD		
ErrorIDEx		Out	DWORD		
RespServiceDat	Out	K6PM_SensorData	Response Data

--------------------------------------------------
Structure type [K6PM_SensorData]

Variable			DataType				Comment
K6PM_SensorData		STRUCT	
@dtDataTime		DATE_AND_TIME			Data acquisition time
@wSensorStatus		WORD				
@PixelTemperature		ARRAY[0..1023] OF STRING[6]	Cell temperature
@InternalTemperature	STRING[6]			
