Libfins is a library to communicate over the FINS/TCP protocol over ethernet with Omron PLCs. The library is written
in C and can be compiled with any modern C compiler. The API to the library is described in this document.
Constants
- PLC CPU modes
- Default communication settings
- Bit force modes
- FINS user message masks
- Data types
- Parameter areas
- Function return values
Structures
struct fins_cpustatus_tp;
struct fins_cycletime_tp;
struct fins_multidata_tp;
struct fins_unitdata_tp;
Functions
Connection Functions
finslib_disconnect( sys );
finslib_tcp_connect( sys, address, port, local_net, local_node, local_unit, remote_net, remote_node, remote_unit, error_val, error_max );
Data Read Functions
finslib_memory_area_read_bcd16( sys, start, data, num_bcd16 );
finslib_memory_area_read_bcd32( sys, start, data, num_bcd32 );
finslib_memory_area_read_bit( sys, start, data, num_bit );
finslib_memory_area_read_int16( sys, start, data, num_int16 );
finslib_memory_area_read_int32( sys, start, data, num_int32 );
finslib_memory_area_read_sbcd16( sys, start, data, num_sbcd16, type );
finslib_memory_area_read_sbcd32( sys, start, data, num_sbcd32, type );
finslib_memory_area_read_uint16( sys, start, data, num_uint16 );
finslib_memory_area_read_uint32( sys, start, data, num_uint32 );
finslib_memory_area_read_word( sys, start, data, num_word );
finslib_multiple_memory_area_read( sys, item, num_item );
Data Write Functions
finslib_forced_set_reset_cancel( sys );
finslib_memory_area_fill( sys, start, fill_data, num_word );
finslib_memory_area_transfer( sys, source, dest, num_words );
finslib_memory_area_write_bcd16( sys, start, data, num_bcd16 );
finslib_memory_area_write_bcd32( sys, start, data, num_bcd32 );
finslib_memory_area_write_bit( sys, start, data, num_bit );
finslib_memory_area_write_int16( sys, start, data, num_int16 );
finslib_memory_area_write_int32( sys, start, data, num_int32 );
finslib_memory_area_write_sbcd16( sys, start, data, num_sbcd16, type );
finslib_memory_area_write.sbcd32( sys, start, data, num_sbcd32, type );
finslib_memory_area_write_uint16( sys, start, data, num_uint16 );
finslib_memory_area_write_uint32( sys, start, data, num_uint32 );
finslib_memory_area_write_word( sys, start, data, num_word );
CPU Operation Functions
finslib_clock_read( sys, datetime );
finslib_clock_write( sys, datetime, do_sec, do_dow );
finslib_connection_data_read( sta, unitdata, start_unit, num_units );
finslib_cpu_unit_data_read( sys, cpudata );
finslib_cpu_unit_status_read( sys, status );
finslib_cycle_time_init( sys );
finslib_cycle_time_read( sys, ctime );
finslib_set_cpu_run( sys, do_monitor );
finslib_set_cpu_stop( sys );
Parameter Area Functions
finslib_parameter_area_clear( sys, area_code, num_words );
finslib_parameter_area_read( sys, area_code, data_ start_word, num_words );
finslib_parameter_area_write( sys, area_code, data, start_word, num_words );
Program Area Functions
finslib_program_area_clear( sys, do_interrupt_tasks );
finslib_program_area_read( sys, data, start_word, num_bytes );
finslib_program_area_write( sys, data, start_word, num_bytes );
Access Functions
finslib_access_log_read( sys, accessdata, start_record, num_records, stored_records );
finslib_access_right_acquire( sys, nodedata );
finslib_access_right_forced_acquire( sys );
finslib_access_right_release( sys );
finslib_write_access_log_clear( sys );
Error and Message Functions
finslib_error_clear( sys, error_code );
finslib_error_clear_all( sys );
finslib_error_clear_current( sys );
finslib_error_clear_fal( sys, fal_number );
finslib_error_clear_fals( sys, fals_number );
finslib_error_log_clear( sys );
finslib_error_log_read( sys, errordata, start_record, num_records, stored_records );
finslib_message_clear( sys, msg_mask );
finslib_message_fal_fals_read( sys, faldata, fal_number );
finslib_message_read( sys, msgdata, msg_mask );
File System Functions
finslib_area_file_compare( sys, start, disk, path, file, num_records );
finslib_area_to_file_transfer( sys, start, disk, path, file, num_records );
finslib_file_memory_format( sys, disk );
finslib_file_name_read( sys, diskinfo, fileinfo, disk, path, start_file, num_files );
finslib_file_read( sys, disk, path, filename, data, file_position, num_bytes );
finslib_file_to_area_transfer( sys, start, disk, path, file, num_records);
finslib_file_write( sys, disk, path, filename, data, file_position, num_bytes, open_mode );
General Utility Functions
finslib_bcd_to_int( value, type );
finslib_errmsg( error_code, buffer, buffer_len );
finslib_filename_to_83( infile, outfile );
finslib_int_to_bcd( value, type );
finslib_milli_second_sleep( int msec );
finslib_monotonic_sec_timer( void );
finslib_raw( sys, command, buffer, send_len, recv_len );
finslib_valid_directory( path );
finslib_valid_filename( filename );