You have Questions. We have Answers.
Below is an extensive list of common questions that we've received over the years. If you have a question not addressed on this page, please use the contact form at the bottom of this page. We'll get back to you as soon as possible.
Can the PLCIO API be extended to support different communications?
Yes – the tool kit includes a simple example for extending the library.

Can I use a different timeout than the default when opening a PLC with plc_open()?
Yes, only if you use a soft PLC open and specify the timeout in the plcio.cfg configuration file. An associated point configuration file is not necessary.

Can PLCIO be run with only the shared libraries and no data files?
Yes. The plcio.cfg and point configuration files are both optional.

What is the maximum length of a tag name in PLCIO?
The 'cip' module only matches ControlLogix tag names up to 63 characters long. Other than that, a tag name is only restricted by the 250-character line limit in the point configuration file.

Can I still use tag names if I do a physical open to a ControlLogix PLC, instead of a soft open?
Yes. PLCIO does not handle numerical addresses with ControlLogix--only tag names.

Can I download a trial version of the PLCIO software so that I can confirm it works with my application?
No. We do not have a trial version, since we require an NDA and distribute our product in source code form. However you are more than welcome to review the manuals and other material on this website prior to making your decision.

Regarding the "virtual" module, there are only two tags: RAW1 and RAW2. What if I need more addresses to store data?
You can use the "tagname(offset)" syntax with these tags. As shipped, RAW1 is 200 bytes in size and RAW2 is 2000 bytes in size. Therefore if you were working with 16-bit integers, you can store 100 integers in RAW1 and reference them as RAW1(0), RAW1(2), RAW1(4), and so on. If you need to increase the size of the tags, you can edit the VIRT_RAW1_SIZE and VIRT_RAW2_SIZE #defines in so/virtual.c and recompile the library.

plc_read() returns the number of bytes read from the PLC. plc_write() seems to always return 0 regardless of what I send. Any idea what might be wrong?
This is correct behavior. plc_write() fails if it is not able to send the complete message or receive a positive verification from the PLC within the specified timeout. Therefore plc_write() only returns 0 on success or -1 on error.

I would like to have separate PLCIO applications listen for messages from separate Allen-Bradley PLCs. How can I do that on the same server?
Only one process can listen on the same TCP/IP port per server. Given that, there are two ways to work around this restriction:

First, you can write a separate PLCIO application that listens for all incoming PLC messages. Based on the message contents or source IP Address, you can then forward the message to the correct process using conventional means (socket or pipe communication). Unfortunately, your original two processes are no longer communicating via PLCIO and extra work is required to send a reply back to the PLC.

The other approach is to enable IP Address aliasing on your server. If you configure the server's network interface to have multiple IP Addresses, then each process can listen on the same TCP/IP port but also on a different IP Address. It is then up to the PLC to send the message to the correct IP Address destination. To listen on a single IP Address in PLCIO, set the j_plcio_ipaddr global variable prior to your plc_open() call.

What is the minimum Linux kernel that PLCIO library requires?
Any Linux kernel version 2.0 or later should work fine.

My application produces a segmentation fault any time I call plc_open(). What could be the problem?
Chances are that you have two different versions of the PLCIO library installed in two different lib/ directories, and one version is dynamically loading PLC modules from another version. Locate all occurrances of libplc*.so* in your filesystem and delete them, then reinstall PLCIO.

plc_open() takes too long to open a ControlLogix PLC. How can I get a quicker response time with a standalone application?
The "cip" module reads all tags from a ControlLogix PLC upon plc_open(). If there are upwards of 1000 tags present, it can take longer than 10 seconds to complete.

To alleviate this problem, use the supplied "plciod" daemon program to initiate a persistent connection to the PLC. Then change plc_open() in your application to use the "remote" module along with your chosen plciod port. Your plc_open() call should now happen instantaneously. Don't forget to restart the "plciod" daemon every time you download a new program to the PLC.

I am waiting on other socket or keyboard input in addition to a message from a PLC. Can I use select() directly on PLCIO file descriptors?
No. In unsolicited mode, PLCIO internally manages a table of file descriptors that can grow or shrink based on the number of PLCs currently connected to your application. The API is not capable of providing you with this list of file descriptors.

We recommend cycling between select() and plc_receive() in your application, with a short (30 milliseconds or less) timeout for each.

Can I install a new version of PLCIO while PLCIO applications are running in the background?
Yes, only on UNIX. The 'make install' process removes old libraries and modules (technically unlinks them from the filesystem) before copying the new ones to the same location. This allows running applications to continue using the old libraries as long as the process stays active. If the application is stopped and restarted, it will begin using the newly installed libraries.

On Windows, libraries cannot be deleted when in use, so this is not possible.

What is the warranty on PLCIO?
There is a one year warranty on PLCIO, see our Warranty and Licensing page to learn more.

The runtime for PLCIO is sold by CPU license. What is a CPU?
For PLCIO, we define a CPU as an active production computer running PLCIO. If this computer is one small Pentium 3 or a huge four CPU Quad Core Xeon processor box, both are defined as One CPU. If there are two computers are running as a cluster, one CPU license is needed for a failover cluster; two (or more) are needed as a “load balanced” cluster. The spirit of our CPU license is “active production” computers.

While installing PLCIO, the following errors appear:

ldconfig was not "found" (make[1]: ldconfig: Command not found)
/sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~:
Permission denied

The install process is intended to be run as root. If that is not possible in your case, you may need to make adjustments to either the /etc/ld.so.conf file or your $LD_LIBRARY_PATH shell variable in order to run PLCIO programs. This depends on the system install location you chose during the 'configure' step. If for instance you chose /usr/local or /usr , then no changes are necessary since the /usr/local/lib and /usr/lib directories are already in the library search path.

But if you chose /usr/local/cti for instance, then the directory /usr/local/cti/lib must be added to /etc/ld.so.conf , and then ldconfig needs to be run afterwards. If you don't have access to /etc/ld.so.conf , then you will need to add this path to your LD_LIBRARY_PATH variable instead by typing this into the shell before running any PLCIO programs:

export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/local/cti/lib

Request More Information
CTI won't share your information with a third party nor automatically add your email to any mailing list.

Founded in 1978, CTI has been a valuable resource for large industries. Since 2001, we've expanded the capabilities of Poling Group tire equipment, including uniformity and geometry testing machines.

©2023 The CTI Division of the Poling Group