|
CTRIO FAQs
FAQ0001
03-May-2002
Q: Are the outputs of the CTRIO module published in V-memory?
A: Yes in v2.x of the firmware, but not in v1.x. However, even if you have
v1.x, if you know where to
look, you can use the RD
command to see the bits.
FAQ0002
29-May-2002
Q: What causes CTRIO to sometimes get double counts or be sensitive to noise?
A: If the CTRIO is counting double you can bet that it is literally seeing
two edges. If the input signal is differential this could happen. You should not allow an
input to CTRIO to traverse both sides of ground (M). Signal quality should be
checked using an oscilloscope. This would reveal whether it is due to a
differentiation, or noise. Things to consider for better noise immunity:
- Use the shortest distance possible for wiring.
- Use shielded cabling.
- Use good routing practices (don't run signal wire parallel to high
voltage, or near electrically noisy devices).
- Isolate the "M" terminal of CTRIO so that it is not common with higher
current devices (i.e. a 2mA current in "M" leg can cause a false ON state in
CTRIO).
- Use bipolar sensor outputs (i.e. totem-pole / push-pull).
FAQ0003
28-Jun-2002
Q: Can't get software reset to function properly from Ladders; and having
quite a variety of other malfunctions.
A: 100% of the time we have found this to be a bug in the program. Therefore
it it recommended:
- Disable the ladders (by inserting an End at the beginning).
- Use the CTRIO Workbench software and the Monitor I/O function to see if
you can perform the action with the buttons.
- If you can, then this is proof that it is a ladders programming error.
FAQ0004
03-Jul-2002
Q: Can Pulse Profile parameters (e.g. accel/decel) be changed on the fly from ladders?
A: No. However, here are some ideas to possibly solve this:
- Use multiple Pulse Profiles (250+)
and then switch between them to obtain different accel/decel settings.
- Create your own "profiles" in the PLC and use the CTRIO's 0x20 Velocity
Mode to output the different Frequencies and Counts you have calculated to
simulate acceleration and deceleration.
FAQ0005 (similar to DirectSOFT FAQ109; ERM FAQ0018)
08-Jul-2002
Q: While installing CTRIO Workbench various problems are encountered.
A: Although installation problems are uncommon the following errors have
been seen:
- (1) "Unable to load INSTCTR.DLL"
Suggested solutions:
-
You are trying to install CTRIO Workbench v2.x onto a Win95 PC. It is not compatible with Win95.
- You are trying to install CTRIO Workbench v1.x onto a PC that has DirectSOFT
v4.x. It is not compatible with that version.
- You are trying to install CTRIO Workbench onto a Win98 PC that has a system
problem. First try installing in the Safe Mode. If this doesn't work you may
have to reinstall Win98.
- (2) "CTRIO.EXE setup error"
You are probably trying to install CTRIO Workbench onto Win2K/WinNT/WinXP
without Administrator rights to the PC.
- (3) "Illegal operation"
This is usually only encountered when installing on a Win98 PC. Installing
in Safe Mode usually fixes this.
- (4) PC appears to lock up.
The PC probably did not lock up. For some reason sometimes during the
install procedure the install will pop up a dialog and wait for your response.
The window that has this dialog sometimes loses focus and gets hidden behind
other windows that may be open. Therefore try pressing the ALT-TAB, switching
to each open window and then minimizing it thus looking for the dialog that
might be behind. This usually works and when the dialog is found, simply press
the <OK> button and the install will continue.
FAQ0006
21-May-2002
Q: Have CTRIO configured for Count Capture. When I get a pulse for capture on Input D
the count is captured properly. However when I get a Reset on Input C not only
is the current count cleared (as expected), the captured count is also cleared!
A: There are two ways in which a Reset can occur. (1) Hardware Reset with
Input C; (2) Software Reset with Reset Bit from PLC. Formerly the Hardware Reset
did indeed behave this way. It would clear both the Current Count and the
Captured Count. The Software Reset however, only cleared the Current Count and
left the Captured Count intact. However, for consistency purposes (and some
other reasons) we changed the behavior of the Hardware Reset to be identical to
that of the Software Reset with regards to the clearing of the Capture Count. This behavior was changed in H2-CTRIO firmware
version v2.1.7. See below for Timing diagrams.

FAQ0007
06/03-2002
Q: Are there examples of each of the CTRIO functions?
A: The manual describes them, and there are several example programs and
configuration files under the HAPTools\CTRIO folder.
FAQ0008
01/13-2003
Q: Encountering various problems when starting up CTRIO Workbench:
A: Here are some of the more common problems:
- (1) In CTRIO Workbench the "Scan Time" and "Max Scan Time" fields are
blank.
This means there is an older copy of the DSPLINK.DLL file in the HAPTools
folder on your PC. Make sure that at least the April 4, 2002 version of
DSPLINK.DLL file is in the DirectSOFT folder and eliminate the one in the
HAPTools Folder entirely; it is not needed.
- (2) CTRIO Workbench indicates the CTRIO module is in "Startup" mode and all
fields are greyed out.
This indicates the CTRIO Workbench cannot communicate with the CTRIO. The
comm issue is not between PC and the PLC, but rather it is between the PLC and
the CTRIO in the base (i.e. backplane comms are failing). Some reasons for
this are:
o - The CTRIO has a damaged backplane connector.
o - The CTRIO is not seated properly in the base (particularly if using DL05,
DL06 or DL405).
o - The CTRIO is in the slot adjacent to the CPU (slot 0) and you are using a
D2-240, 250 or 260 CPU. Move it to another slot.
o - You are using CTRIO Workbench v1.1 with a CTRIO that has firmware version
2.0.1 or later. Update your Workbench.
o - You are using CTRIO Workbench v1.1 and starting it from DirectSOFT. Either
start it from DS Launch or upgrade CTRIO and Workbench.
o - The PLC has old firmware. The
Product
Advisory details the revision levels required.
o - The PLC power is OFF.
o - You have a DL205 in a "-1" base and you have an H2-EBC, H2-WinPLC or
H2-PBC that is incompatible with the newer "-1" bases. (If you have an older
EBC, PBC or WinPLC, you must either RMA them back to Automation Direct for
upgrade, or send them to us (Host Engineering, Inc).
Hardware requirements for -1 base usage:
H2-EBC must be 7F, 8F or
later.
H2-EBC-F must be 1F or
later.
H2-WPLC1, WPLC2 must be
4K, 5K or 6K or later.
H2-WPLC3 must be 1K or
later.
H2-PBC must be 2D or
later.
(NOTE: "7F" meaning - "7"
is bare board revision. "F" is the revision of the assembly drawing.)
- (3) DS Launch does not display the CTRIO Workbench 2 startup options.
For DS Launch to display these startup selections on its menu you must
have at least DirectSOFT v4.0 Build 18 or later.
- (4) In DirectSOFT (PLC --> Tools) there are multiple listings of CTRIO and
ERM Workbench.
We're not sure how this happens. But the options are setup in the Windows
Registry. To remove them manually it is required that changes be made directly
to the Registry. This is not recommended for the normal user! And on some
PCs the Administrator does not permit it. However, if you dare:
1. Select Start --> Run...
2. Type in regedit and press the <OK> button.
3. Open HKEY_LOCAL_MACHINE folder.
4. Open SOFTWARE folder.
5. Open Host Engineering, Inc. folder.
6. Click on the HAPTools folder.
Now in the right window you will see five strings values:
(Default) REG_SZ (value not set)
a
REG_SZ CTRIO Workbench2;;CTRIO configuration utility;;C:\HAPTools\CTRIOwb2.EXE
b
REG_SZ ERM Workbench;;Ethernet Remote Master Workbench
configuration utility;;C:\HAPTools\ERMWB.EXE
InstallList REG_SZ ab
NextInstall REG_SZ c
To remove them completely right-click on a, b, InstallList and NextInstall one
at a time and delete them. The only string value that should remain is
(Default).
If you are plagued by multiple menu selections, then just make the registry
entries look exactly like the above.
- (5) In DirectSOFT selecting PLC --> Tools causes PC to lock up.
We have found this to sometimes happen in versions earlier than v4.0 Build
18, when you have installed CTRIO Workbench and/or ERM Workbench under a
different folder other than from c:\HAPTools. To fix:
- Uninstall CTRIO Workbench & ERM Workbench (Start --> Programs --> AutomationDirect
Tools --> Uninstall).
- Reinstall CTRIO Workbench & ERM Workbench with the default folder (c:\HAPTools).
To do this run the DirectSOFT install, but select the <Custom> install
button and uncheck everything except CTRIO Workbench & ERM Workbench. In
other words, you probably don't need (or want) to reinstall DirectSOFT, but
merely the Workbenches.
- (6) Get "Error reading Shared RAM!"
This means that the CTRIO cannot read/write to the PLC across the
backplane. This is commonly caused by one of the following:
- You are trying to connect to a CTRIO via DCM, ECOM or serial connection
and you have selected DirectNET protocol. You must use K-sequence protocol. Or
for the ECOM you can also use ECOM protocol (recommended).
- You are trying to connect to a CTRIO that is installed in a PLC rack whose
CPU has a password and it has not been unlocked by DirectSOFT. To fix you must
connect with DirectSOFT and enter the password.
- Try reseating the CTRIO or trying a different slot.
- The slot, backplane, CPU or CTRIO is defective. Replace.
- (7) Get "Error reading configuration"
This means that CTRIO workbench is not getting enough of the PLC's time to
upload the CTRIO configuration across the backplane. This is commonly caused
by the PLC being too busy with other comms. This can be confirmed by switching
the PLC to STOP and then back to TERM (this will take it out of RUN mode!),
and then trying again. If it works, then this is confirmation.
FAQ0009
03-Jun-2003
Q: When editing Pulse Profiles there is nothing indicating that a particular
pulse profile is active or has been selected. Instead, the tabs give the
impression that they are all equally selectable.
A: Host changed from the tab select to a list in CTRIOwb v2.0.
FAQ0010
03-Jun-2002
Q: Variables in a CTRIO in PLC rack to Think&Do make sense in Monitor
I/O, but not when CTRIO is plugged into WinPLC.
A: Host added the ability to display the Monitor I/O in several different
formats, including WinPLC format to CTRIOwb v2.0.
FAQ0011
03-Jun-2002
Q: CTRIO Workbench doesn't automatically enable link if you double-click on it.
A: Added this feature to CTRIO Workbench v2.0.
FAQ0012 (see also
WinPLC FAQ0036; EBC FAQ0079)
04-Feb-2008
Q: When trying to connect to CTRIO in WinPLC or EBC/EBC100 base with CTRIO
Workbench, getting "Error reading
base definition".
A: This is usually caused by the CTRIO Workbench not having enough of the
backplane bandwidth to complete a connection. Thus, depending on what type of
base the CTRIO is installed in:
If WinPLC: Try stopping the WinPLC's application from running; then try CTRIO
Workbench again.
If EBC/EBC100: Try stopping the master that
is currently polling, or disconnect from the master altogether; then try CTRIO
Workbench again.
FAQ0013 (see also EBC FAQ0048; ERM FAQ0031; WinPLC FAQ0029; SDK FAQ0013)
22-Nov-2002
Q: Is it possible to utilize the CTRIO System Functions everywhere it can be
installed?
A: In firmware v2.x System Functions were added to the CTRIO products (H0-,
H2-, H4- and T1H-CTRIO). These System Functions would allow you to write (and
read) various internal registers of the CTRIO. The following table shows what
scenarios that these System Functions can be used and how to use them:
| |
System Function |
CTRIO Configuration |
| Local DL PLC Base |
Remote DL PLC Base |
DL PLC with ERM/EBC |
WinPLC (Think&Do) Local Base |
WinPLC (Think&Do) with ERM/EBC |
Think&Do (Entivity) to EBC |
Ethernet SDK to EBC |
| Mapped
System Functions (i.e. in V-memory) |
Status of Inputs |
YES |
NO (4) |
YES |
YES |
YES |
YES |
YES |
| Mode & Status of Outputs |
YES |
NO (4) |
YES |
YES |
YES |
YES |
YES |
| CTRIO Shared
RAM System Functions |
0x01 - Read all registers |
YES (1) |
NO (4) |
NO (5) |
YES (2) |
YES (2) |
YES (2) |
YES (3) |
| 0x02 - Write all registers |
YES (1) |
NO (4) |
NO (5) |
YES (2) |
YES (2) |
YES (2) |
YES (3) |
| 0x04 - Write one register |
YES (1) |
NO (4) |
NO (5) |
YES (2) |
YES (2) |
YES (2) |
YES (3) |
| 0x05 - Write reset value |
YES (1) |
NO (4) |
NO (5) |
YES (2) |
YES (2) |
YES (2) |
YES (3) |
(1) - Use RD/WT instruction in Ladders.
(2) - Use Shared RAM Operations for CTRIO in a CALL block.
(3) - Use Ethernet SDK routine HEIWriteSharedRAM / HEIReadSharedRAM.
(4) - Not possible because CTRIO will not work in remote bases.
(5) - Not possible because Ladders cannot tell the ERM to access the
Shared RAM of CTRIO in EBC base.
FAQ0014 (see also WinPLC FAQ0013, EBC FAQ0030)
11-Feb-2003
Q: What is the expected hit on the scan time for adding an H2-CTRIO to WinPLC
or EBC rack? When I connect with Entivity and add more than one H2-CTRIO I get a
timeout.
A: This is different for each product:
For WinPLC, there could be a detectable hit (however, small) simply
because it has a comparatively slower processor (100MHz).
On the EBC itself, the
addition of a CTRIO will probably not be noticeable at all simply because the
EBC has only one thing to do . . . update its I/O.
On a Think&Do or Entivity application there will be about 7ms/CTRIO hit due to the number of tags that
are created to handle the extra I/O scanning of the CTRIO from the PC. Thus, in
the Connectivity Center of this software, under "Attributes" you must increase
the "Timeout Value for Retries(ms)" value accordingly.

FAQ0015
20-Dec-2002
Q: Using CTRIO v2.0. If running velocity mode, can the number of pulses that
have been output be read?
A: There is a register that can be read out that will contain the number of
counts that have been sent out since the output enable bit was set. There is an
example program on Host's website that shows how this is accomplished.
FAQ0016 (see also WinPLC FAQ0007)
17-Feb-2003
Q: Is there a way to change the preset values in multiple Preset Tables from WinPLC
to CTRIO on the fly?
A: Basically there are two choices to do this with CTRIO:
- Make a Preset Table that turns on an output and use the "0x15 - Edit
Entry / Reload" command to change the preset value in this table when
needed
- Configure multiple Preset Tables (there are 256 tables available) with different preset values and using
the "0x10 - Load Table" command to load the different ones when
needed.
FAQ0017
17-Feb-2003
Q: Can the CTRIO be made to count in both directions (quadrature encoder) but
only in a positive range (e.g. 0-499)?
A: Not easily. Here is how it could work:
- Create a Preset Table to handle the positive direction by making it reset
the count to 0 (zero) when it reaches a count of 499.
- To handle the negative direction, read the count from the CTRIO in the PLC
for two consecutive scans and compare them. If the count went down between
scans, then set a C-bit to indicate a negative direction. As long as the
count goes down, keep the bit set.
- If the count increases, clear the C-bit.
- If the count keeps decreasing and reaches 0 (zero), then execute a System
Command to the CTRIO and write the current count to +499.
In the above solution, the positive direction would work flawlessly, but the
negative direction would be sensitive to the speed at which the encoder is
turning along with the speed of the PLC scan. Also, depending on which direction
is more critical in your application, you could just as easily make a Preset
Table to handle the negative direction and the PLC program to handle the
positive direction.
FAQ0018
04-Jan-2008
Q: What is the input impedance of the CTRIO input?
A: On the input of the CTRIO is a JFET (Junction Field Effect Transistor) in
a constant-current source arrangement. In this manner it guarantees the input
current will be between 5-15mA for the range of 9-30V. So, the input impedance
varies based on this characteristic. So at the high voltage extreme:
- 30V input at 15mA = 30/15m = 2KΩ
- 30V input at 5mA = 30/5 = 6KΩ
FAQ0019
06-Feb-2008
Q: How does the Pulse Catch function operate? (The manual is a bit unclear).
A: Below is an example timing diagram of the functionality of Pulse Catch
with notes at the end explaining. The settings used to generate this diagram are
not likely in the real world, but are given here as only an example.
CTRIO Workbench configuration for the diagram:
- Input C = Pulse Catch
- Pulse In = Rising Edge
- Minimum Width In = 300µs
- Pulse Out Width = 1ms

NOTES:
- The 1st thing to do is to SET the Enable Capture bit. This will cause
the CTRIO to start looking for the pulse on Input C.
- The 1st pulse is ignored (200µs*) because it doesn't meet the 300µs
minimum configured.
- The 2nd pulse is captured (400µs**) because it meets the 300µs minimum
configured.
- The 3rd pulse is ignored (400µs***) because though it meets the 300µs
minimum configured, it occurs during a capture.
- The Capture Start Bit comes ON as soon as an edge is detected and goes OFF
if the pulse does not meet the 300µs minimum. However, it stays ON through
the duration of a catch.
- The Output Pulse Bit comes ON as soon as the minimum 300µs minimum is met
and stays ON for the Pulse Out Width of 1ms as configured.
- The CTRIO Output, if configured for this, will perfectly track the Output
Pulse Bit.
Thus, the 2nd pulse is the one that is captured above, and reflected in the
1ms output. In a more practical application, the pulse width would probably be
in the <25ms range (as above), but the Pulse Out Width would probably be much
longer (e.g. >25ms) so that the PLC would be insured of "seeing" it.
FAQ0020
06-Feb-2008
Q: Is it possible to reset the Preset Table's pointer back to the 1st entry
in the Table without resetting the Count or disabling the Output?
A: Yes. The "'round-about" way of doing this is to simply reload the exact
same unchanged Preset Table (0x10 Load Preset Table).
FAQ0021
18-Mar-2003
Q: Will the CTRIO retain the current count upon power loss? (i.e. Does it
have retentive count capability?)
A:
The CTRIO itself does not have this capability, however, there is a
way to accomplish this if you have CTRIO v2.0 or later by utilizing the new
CTRIO System Commands and the retentive V-memory of the host PLC. (Sorry, there
is no way to do this if you are using CTRIO v1.0) :(
However, if you have CTRIO v2.0, you can use the System Commands to read and
write to individual registers of the CTRIO from the PLC program; including
writing to the current count. Thus, you can add code to the PLC program that
will store the current count into retentive PLC V-memory every scan during
normal operation. Then if power is lost, the current count will be retained in
the PLC's retentive V-memory. Then, when power is restored, on the first PLC
scan, this V-memory location can be written back directly to the current count
of the CTRIO. Thus a "simulated" retentive action is accomplished.
To see how this is accomplished, you can download the CTRIO v2.0 examples
from this website. Click:
http://www.hosteng.com/HW-Products/CTRIO/CTRIO.htm#Documentation. Or if that
doesn't work:
- Go to http://www.hosteng.com
- Click Please Continue>>.
- In the left column click Hardware.
- Under that click CTRIO.
- You can either click on Documentation at the top of the page, or scroll
down until you see Documentation.
- Click on CTRIO_DL205_Examples and download.
- Unzip the folder into your projects folder.
Now you can open the project "Retentive Current Count" from DirectSoft and
study the code to see how this is accomplished. Documentation for the new System
Commands is also in the CTRIO v2.0 Manual.
FAQ0022
18-Mar-2003
Q: Trying to control a stepper motor drive, but sometimes it moves in the
wrong direction (e.g. staring up; homing).
A:
Make sure that your stepper motor and stepper motor drive don't have a
minimum frequency. If they do, then make sure, of course, that the CTRIO output
frequencies are configured to put out at least that minimum frequency
requirement or else you can get erratic performance (i.e. reversing direction)
from your motor.
FAQ0023
13-Aug-2002
Q: What is the resolution of the Edge Timer?
A: The maximum resolution is one microsecond (1µs).
FAQ0024
03-Apr-2003
Q: The CTRIO stays in the booter (OK and ERR LEDs are blinking) after
attempting to upgrade its firmware; or gets "OS loader failure" error.
A: This is normally a bandwidth problem (i.e. the firmware telegrams aren't
getting there in an efficient fashion. Here are some things that will cause this:
- If firmware upgrade is attempted while the PLC/WinPLC is in the RUN mode.
- If firmware upgrade is attempted while the EBC is talking to an ERM.
- If firmware upgrade is attempted while you are online with DirectSoft and
Status is turned on.
- If firmware upgrade is attempted through an ECOM that is being used by an
EZ Ethernet adapter.
So, before attempting to upgrade, make sure that none of the above is true
(e.g. PLC is in PGM mode; ERM (not EBC) is unplugged from network to free up the
EBC; DirectSoft isn't connected at all; etc.). If your
CTRIO is in the booter mode already (OK and ERR LEDs are blinking), just rerun
the firmware upgrade with the above precautions.
FAQ0025
06-Oct-2008
Q: When attempting to use the Import function for Freeform Pulse Profile, get
"Error on line 1: ..." no matter what I do.
A: This is a bug exclusive to CTRIO Workbench v2.1.11 (all earlier versions
work). This can be fixed by upgrading to:
CTRIO Workbench v2.1.12 (or later)
To download the latest CTRIO Workbench:
(1) Goto www.hosteng.com.
(2) In left column, click Hardware --> CTRIO.
(3) Scroll down to CTRIO Workbench v2.1.12 (or later) link.
FAQ0026 (deleted)
FAQ0027
29-Aug-2002
Q: Is it possible to write a value to the current count in the CTRIO?
A: Yes, using System Command 0x02 Write all registers, and System Command 0x04
Write one register (see manual for details).
FAQ0028
03-Sep-2002
Q: It appears that the CTRIO sometimes misses the Z-pulse from my encoder.
A: If this appears to happen (usually at higher frequencies) then you should
upgrade the CTRIO to at least v2.0. There was a small window of time in the
older CTRIO (v1.0) where it was possible for this to occur. The CTRIO
firmware v2.0.1 fixes this.
FAQ0029
09-Sep-2002
Q: With a 100KHz pulse input, how many counters can the CTRIO support?
A: The H2-CTRIO and H4-CTRIO can have 2 quadrature or 4 regular counters
configured. The H0-CTRIO can have 1 quadrature and 2 regular counters
configured.
FAQ0030
25-Sep-2003
Q: Using Process Commands, the Command Complete bit never gets set. Everything
in Monitor I/O works, however.
A: Consider:
- You could have a bug in your PLC program causing this. Therefore, try
putting an END at the top of your program and then manipulating the CTRIO bits
and words manually in a Data View. If manual control works, you have a bug in
your PLC program.
- There was a bug in the H2-CTRIO firmware in versions less than (<) v2.1.6
where if you were using 4-range I/O mapping in the CTRIO that the Command
Complete bit would never come on. Therefore if you have versions earlier than
v2.1.6, then upgrade.
FAQ0031
30-Sep-2003
Q: I need to read both the speed/velocity of my encoder input as well as the
position (raw count). Is this possible?
A: Both the Scaled Units and the Raw Value are output from the CTRIO to the PLC
in the I/O Mapping.
FAQ0032
30-Sep-2003
Q: I need to control a CTRIO output based on both a speed/velocity input reading
from my encoder as well as the position (raw count). Is this possible?
A: Even though Scaled Units and Raw Value are output from the CTRIO to the PLC
in the I/O Mapping, you cannot configure a single CTRIO output to respond based
on both the speed/velocity (Scaled Units) value and the position (Raw Value).
You could, however, hook the encoder to 2 channels of the CTRIO and use 2
outputs; 1 to respond to the speed/velocity (Scaled Units) value and the other
to respond to the position (Raw Value).
FAQ0033
30-Sep-2003
Q: Will the H2-CTRIO work with the F2-DEVNETS-1?
A: No, the H2-CTRIO will not work with the F2-DEVNETS-1 (nor the earlier
F2-DEVNETS) nor are there any plans to make these work together. However the
T1K-DEVNETS is currently (2nd Quarter 2004) being worked on to work with the
T1H-CTRIO.
FAQ0034 (see also ERM FAQ0019; EBC FAQ0029)
30-Sep-2003
Q: Will the CTRIO work in the local expansion bases of DL205 or DL405 line?
A: No. Do not install the H4-CTRIO nor the H2-CTRIO in local expansion. It will
however work in the ERM/EBC configuration. So you can expand the I/O using the
ERM/EBC instead.
FAQ0035
26-Sep-2002
Q: How many quadrature encoders can I connect to a CTRIO?
A: The H2-CTRIO and H4-CTRIO can support 2 quadrature encoders each. The
H0-CTRIO can support only 1.
FAQ0036
26-Sep-2002
Q: Using Temposonic quadrature absolute encoder, and occasionally the count in
the CTRIO module jumps by 65,536 counts.
A: The Temposonic quadrature encoders actually artificially generate pulse
trains based on the absolute position of their magnets. The faster versions are
of high enough resolution that when they are at rest the electronic pulse
generator inside is actually jittering. This causes direction changes for the
CTRIO that are much too fast for it to handle (i.e. out of spec for the speed of
the inputs); in fact, the direction changes are taking place faster than a real
encoder with real mechanical motion could possibly generate. Thus it is not
recommended that these style of encoders be used with the CTRIO unless you make
sure that the resolution is large enough (i.e. not as sensitive) so as not to
artificially generate these direction changes too quickly.
FAQ0037
30-Sep-2002
Q: How is the Rate calculation performed by the CTRIO.
A: Basically, the formula is:

Or simplified as:

Where:
R = Result
M = Multiplier
U = Units in seconds
P = Pulse interval in seconds
C = Counts per unit
S = Scale offset
So as an example if in your CTRIO configuration you had selected:
- Output Format = Integer x100 (2 implied decimal places); then M = 100.
- Counts / unit = 1000; then C = 1000
- Scale Offset = 5; then S = 5
- Unit Time Base = minutes; then U = 60
With this configuration, let's say the CTRIO measures one pulse interval on
its input of 60 milliseconds; then P = 0.06. Therefore:

If in doubt, always use CTRIO Workbench's "Interval Scaling Calculator" while
doing the configuration. This will help you understand what is going on with the
settings you are picking.
FAQ0038
10-Jul-2002
Q: Using Data Smoothing for a Rate calculation in H2-CTRIO, the initial value is
way off, but after several samples it starts working correctly.
A: This was a bug in the CTRIO firmware. This behavior is corrected in v2.0.1
firmware.
FAQ0039 (see also EBC FAQ0038; PBC FAQ0006)
27-Aug-2002
Q: In order to use the newer T1H-CTRIO or H4-CTRIO, what are the requirements as
far as configuration software, hardware and firmware?
A: Here are the requirements:
- CTRIO Workbench needs to be at least v2.1.2.
- T1H-CTRIO firmware needs to be at least v2.1.2.
- H4-CTRIO firmware needs to be at least v2.1.2.
- If using T1H-CTRIO in T1H-EBC the T1H-EBC hardware needs to be at least
"2I" and firmware v1.0.444.
- If using T1H-CTRIO in T1H-PBC the T1H-PBC hardware needs to be at least
"2D" and firmware v1.1.10.
- If using H4-CTRIO in H4-EBC the H4-EBC hardware needs to be at least "4F"
and firmware v2.1.328.
- If using H4-CTRIO in D4-450 the D4-450 needs to be at least T1.985.
FAQ0040
08-Oct-2002
Q: When my CTRIO outputs are tied to Preset Tables, I cannot disable them. Why?
A: CTRIO outputs have two names:
- Raw Outputs - These outputs are turned ON and OFF with the Output
Enable bit.
- Discrete Outputs - These outputs are tied to a Preset Table
function and the Output Enable bit has no effect on them. Instead they are
exclusively controlled by the Preset Table itself. This is by design for the
purpose that once you configure the Discrete Output to a Preset Table there
will be no PLC Ladders necessary for it to function. It is considered in an
"Automatic" mode. If, however, you send a command to this channel, then it
will go into a "Manual" mode and from that point on, it will have to be
controlled by Ladders using the Enable Output bit.
FAQ0041
08-Oct-2002
Q: What is the minimum firmware version of the DL250-1 necessary to work with
the H2-CTRIO?
A: All DL250-1 PLCs work with the H2-CTRIO. However, if you have the older
DL250, then it must have firmware v1.56 or later.
FAQ0042
08-Oct-2002
Q: When CTRIO is powered up, the ERR light comes on.
A: This ERR light indicates a serious and fatal error in the CTRIO has occurred.
Check:
- Make sure the CTRIO is plugged in securely to the base.
- The base could be bad. Swap out with another one to make sure.
- The CTRIO itself could be bad.
FAQ0043 (see also EBC FAQ0043; PBC FAQ0008)
11-Oct-2002
Q: How many T1H-CTRIOs can be installed in one base?
A: For T1H-EBC, 13. For T1H-PBC, 2. The limit is data budget.
FAQ0044
22-Oct-2002
Q: Using a Preset Table I cannot get RESET COUNT at 1250 and RESET COUNT at
-1250 to work.
A: This problem actually stems from a misunderstanding as to how the CTRIO's
Preset Tables function. Your table:
RESET COUNT at 1250
RESET COUNT at -1250
When the CTRIO sees a RESET COUNT instruction it zero's the count as
expected, but it also resets the pointer back to the beginning of the table;
which means that once the count is reset after reaching the value of 1250, it is
goes back and starts looking for 1250 to happen again.
The function you are trying to get to work is more properly called a
programmable limit switch (PLS). We are considering adding this function to the
CTRIO in the future.
FAQ0045 (deleted)
FAQ0046 (see also EBC FAQ0047; ECOM FAQ0036; EDRV FAQ0009; ERM FAQ0030; EZ
Ethernet FAQ0018; PBC FAQ0009; PSCM FAQ0001; WinPLC FAQ0018; NetEdit FAQ0014)
07-Nov-2002
Q: What software tool do I use to upgrade/downgrade my Host Engineering
hardware?
A: Refer to the following:
|
Host Hardware |
Part Number |
Firmware/Booter Upgrade Tool |
| CTRIO |
H0-CTRIO
H2-CTRIO
H4-CTRIO |
CTRIO Workbench |
EBC
EBC100 |
H2-EBC
H4-EBC
T1H-EBC |
NetEdit3 |
| T1H-EBC100 |
NetEdit3 (v3.4 or higher) |
| H2-EBC100 |
NetEdit3 (v3.5 or higher) |
ECOM
ECOM100 |
H0-ECOM
H2-ECOM
H4-ECOM |
NetEdit3 |
H0-ECOM100
H2-ECOM100
H4-ECOM100 |
NetEdit3 (v3.5 or higher) |
| EDRV |
EDRV |
NetEdit3 |
| ERM |
H2-ERM
H4-ERM |
NetEdit3 or ERM Workbench |
| EZ Ethernet |
EZ Ethernet
EZ EtherPLUS |
EZ Touch |
| PBC |
H2-PBC |
NetEdit3 |
| PSCM |
H0-PSCM
H2-PSCM |
| WinPLC |
WinPLC |
WinPLC Workbench |
NOTE: All the firmware for the above products can be downloaded using
NetEdit3's File --> Live Update... The firmware files are stored in c:\HAPTools\Images
folder.
FAQ0047 (deleted)
FAQ0048
15-Feb-2008
Q: How do I change direction on the Pulse Outputs (i.e. direction of the motor)?
A: Direction is changed depending on the Pulse Profile you have loaded to
control the Pulse Output.
|
COMMAND CODE |
TABLE |
DIRECTION CHANGE |
EXAMPLE
MAPPING (1) |
| 0x10 -
Load Table |
Trapezoid |
Direction bit |
C204 |
| S-Curve |
Direction bit |
C204 |
| Symmetrical S-Curve |
Direction bit |
C204 |
| Dynamic Positioning |
Parameter3 & Current Position (2) |
V2020-V2021
(decimal) |
| Dynamic Velocity |
Sign of Parameter3 (3) |
V2020-V2021
(signed decimal) |
| Home Search |
Direction bit |
C204 |
| Free Form |
Direction bit |
C204 |
| 0x20 - Velocity Mode |
(4) |
Direction bit |
C204 |
| 0x21 - Run to Limit
Mode |
(4) |
Direction bit |
C204 |
| 0x22 - Run to
Position Mode |
(4) |
Direction bit |
C204 |
NOTES:
(1) - The example mapping is based on PLC - Mapped Addresses (4
ranges) with:
Starting V address for word inputs: V2000-V2017
Starting V address for bit inputs: V40600.0-V40605.15 (C0-C137)
Starting V address for word outputs: V2020
Starting V address for bit outputs: V40606.0-V40613.15 (C140-C277)
(2) - The CTRIO determines the direction by taking the
difference between Parameter3 minus Current Position. If the result is positive,
the Pulse Outputs will go one way; if negative, the other.
(3) - Parameter3 is a signed decimal double-word. If it is
negative, Pulse Outputs will go in one direction; if positive, the other.
(4) - No tables are associated with these direct commands.
For NOTE (3) above, to load a negative value (32-bit 2's compliment;
decimal) into Parameter3 (e.g. V2020-V2021) starting with a BCD number in
V3000-V3001 you would do the following logic; if, however, the value in
V3000-3001 is already in binary format then you would, of course, leave out the
BIN box:

FAQ0049
01-Nov-2002
Q: Can the H2-CTRIO interrupt the PLC when it reaches a certain count like the
CTRINT module?
A: No. The H2-CTRIO does not have the ability to interrupt the CPU like the
CTRINT. The reason is the DL205 backplane does not have an interrupt line for
each slot. The slot adjacent to the CPU (Slot 0) has 4 of its address lines
converted to interrupt lines that are only useable by the CTRINT.
FAQ0050
02-Dec-2002
Q: Is the CTRIO configuration stored in battery-backed-up RAM?
A: No. The configuration for the CTRIO is stored in NVRAM (Non-volatile RAM) and
therefore will not be lost on power failure or battery failure.
FAQ0051 (see also DirectSOFT FAQ0163; ERM FAQ0032)
10-Dec-2002
Q: Will DirectSOFT work on Win95 32-bit OS?
A: We have seen this work on a few and not work on others. If it doesn't
work we do not know of anything that can be done to make it work. However CTRIO
Workbench and ERM Workbench will not even install if the InstallShield engine
(used to install DirectSOFT) recognizes that the PC is Win95.
FAQ0052
19-Dec-2002
Q: Is there a minimum load required for the CTRIO outputs?
A: No. The CTRIO output is a FET (Field Effect Transistor) which is normally
50m Ω(ohms). Leakage for this device is typically at 150μ amps at temperature
extremes. Thus if the load is so small as to require only 150μ amps, then it
could inadvertently turn on.
FAQ0053
10-Feb-2003
Q: Installed CTRIO Workbench v2.0 but no options to launch it show up
in DSLaunch.
A: By installing CTRIO Workbench v2.0, changes are made to the DS400.INI
file. However because you are using an older version of DirectSOFT these menu
items cannot be displayed in DSLaunch. In order for these launch items to show
up on the DSLaunch menu, CTRIO Workbench v2.0 requires at least DirectSOFT v4.0
Build 18.
FAQ0054
25-Feb-2003
Q: Need to know more about how to configure and control the CTRIO from
the PLC program.
A: Try reviewing the flowcharts in our document (see
CTRIO Flow Charts.PDF), this answers
most questions.
FAQ0055 (see also EBC FAQ0049)
10-Mar-2003
Q: Are there any slot restrictions for the CTRIO if installed in an EBC?
A: The following restrictions apply:
- If using H2-EBC with a hardware revision less than 9A, you can install
H2-CTRIO in all slots except Slot 0 (the one adjacent to the EBC itself).
- If using H2-EBC with a hardware revision of 9A or greater, there are no
slot restrictions.
- If using H4-EBC there are no slot restrictions.
- If using T1H-EBC there are no slot restrictions.
FAQ0056
13-Mar-2003
Q: While testing Run-to-Position function using Monitor I/O; it seems
it doesn't function properly when I enter certain values for the next position.
A: This was a bug in CTRIO Workbench v2.0. The problem was that in Monitor
I/O the position value in the CTRIO was internally using an Integer instead of a
Floating Point value. To fix, upgrade to CTRIO Workbench v2.1.
FAQ0057
20-Jul-2004
Q: In the Automation Direct catalog (pg. 4-68) it is stated that the
CTRIO under certain conditions can output a pulse of up to 50 KHz; but Monitor
I/O will not allow me to input a frequency higher than 25 KHz.
A: This was an original intention of the CTRIO, but it did not end up that
way. The catalog is incorrect as the CTRIO stands now. The upper limit of the
Pulse Output is indeed 25 KHz like Monitor I/O limits you to.
FAQ0058
06-Oct-2004
Q: Will a TTL encoder work with the CTRIO?
A: Not directly; you will have to build a circuit to step up the voltage
into the CTRIO's specified range. (The schematic can be downloaded
here.) Or you can order these boards from Host
Engineering, Inc, P/N = CTRIO-TTLANNEX. Contact
support@hosteng.com. This board can
also be used as a buffer between some low-voltage switches (e.g. Sauer-Danfoss
KPPG16408 hall-effect switch) and the CTRIO to allow them to work.
FAQ0059
09-Nov-2004
Q: What is the maximum length between edges that the CTRIO's Edge Timer can
measure?
A: The CTRIO's Edge Timer can measure a maximum of 268,435,455µs between
edges. (i.e. 268.4 seconds or about 4 ½ minutes).
FAQ0060
18-Nov-2004
Q: How can I wire an open-collector quadrature encoder to the CTRIO?
A: You can use the following diagram for the H2-CTRIO for all CTRIOs. Just
pay attention to the signal names on the CTRIO connector:

FAQ0061
06-Aug-2004
Q: What causes the Output Stalled error bit to come on?
A: This bit means the Pulse Output train was interrupted because the CTRIO
was too busy doing other things. Some things to try:
- Eliminate or reduce the use of the Edge Timing function.
- Eliminate or reduce the use of Rate Scaling.
- Reduce the frequency of the Pulse Output(s).
- Eliminate or reduce the use of other Pulse Outputting.
- Add a second CTRIO and divide these tasks among them.
FAQ0062 (see also EBC FAQ0054; NetEdit FAQ0015)
02-Feb-2005
Q: Using an EBC100 and Modbus TCP protocol, how can I figure out where the CTRIO
parameters are mapped into the Modbus addresses?
A: The easiest way to do this is to use NetEdit3 and CTRIO Workbench in
combination. Follow these steps:
- Using NetEdit3 (at least v3.4) to view the network that the EBC100 is
connected to.
- Right-click on the EBC100 and pick "Show Base Contents..."
- Scroll down until you see your CTRIO I/O listed. It will look something
like this:
Base 0 : Slot 8 - Module Type 38 - T1H-CTRIO
96 - Bit inputs
(Modbus 584/984 - Inputs 10025-10120)
96 - Bit outputs
(Modbus 584/984 - Coils 25-120)
12 - Word outputs
(Modbus 584/984 - Holding registers 40017-40028)
8 - Double word inputs (Modbus 584/984 -
Input registers 30049-30064)
4 - Double word outputs (Modbus 584/984 - Holding
registers 40029-40036)
Here you can see that NetEdit3 has provided the Modbus addressing for you.
Next you need only to see how these work in the CTRIO.
- Using CTRIO Workbench (at least v2.1.9) connect to your CTRIO via the
EBC100.
- Press the <I/O Map...> button. (This is assuming that you have already
configured your CTRIO the way you want).
- Select "EBC - Mapped to MODBUS/TCP."
- For "Starting input reg for word inputs:" enter the "Input register"
number that you saw in NetEdit3 (e.g. 30049 in above example).
- For "Starting input for bit inputs:" enter the "Inputs" number that you
saw in NetEdit3 (e.g. 10025 in above example).
- For "Starting holding reg for word outputs:" enter the smallest "Holding
registers" address that you saw in NetEdit3 (e.g. 40017; not
40029 in above example).
- For "Starting coil for bit outputs:" enter the "Coils" number that you saw
in NetEdit3 (e.g. 25 in above example).
After manually entering these numbers from NetEdit3 into CTRIO Workbench's
I/O mapping screen you can now see all the parameters and their appropriate
Modbus TCP addressing.
FAQ0063
15-Feb-2005
Q: Can I change the default folder for storing the CTRIO Workbench configuration
files (.CWB)?
A: Yes. CTRIO Workbench uses the default projects folder as defined in the
DS400.INI (or DS300.INI) file. When CTRIO Workbench starts up it looks for the
DS300.INI file first and if it finds it, it will use the default projects folder
as defined there. If it does not find the DS300.INI file, it will look for the
DS400.INI file and use the default projects folder as defined there. If it
cannot find the DS400.INI file then it will fault with: "Critical Error - ERROR
1004 - Invalid INI File" and will close when you press the <OK> button.
To change the default folder:
- Close CTRIO Workbench (if you have it open).
- From Windows desktop, Start --> Run...
- Type in "ds400.ini" or "ds300.ini" whichever one you have.

- Press <OK> button. This should open up a text editor (usually Notepad) showing the contents of this file.
- Find the heading [PATHS]. Under this heading you will see a "PATH" line, looks something like:
PATH=C:\DirectSOFT4\Projects\
- Edit this path to point to one of your own choosing.
- Save the file and exit.
- Restart CTRIO Workbench.
Now when you use the <Write File> button the
default folder will be the one you entered.
FAQ0064
16-Feb-2005
Q: Using the "BCD (rounded)" selection for Position Scaling; the Position
Scaling Calculator depicts a different behavior than what the CTRIO actually
does.
A: Yes, this is a bug in the Position Scaling Calculator in versions of CTRIO
Workbench of v2.1.9 or less. The incorrect behavior is in the Position Scaling
Calculator itself. The CTRIO is actually functioning correctly in that it rounds
the scaled value up like you would think (and like the function's name says).
However, the Position Scaling Calculator does not round up; instead it is
truncating the fraction.
FAQ0065
08-Mar-2005
Q: How many Presets can be added to each Preset Table?
A: 255.
FAQ0066
08-Mar-2005
Q: How many Presets Tables can the CTRIO have?
A: 255.
FAQ0067
08-Mar-2005
Q: Can the duty cycle of the pulse output be changed if using Dynamic Velocity
or Dynamic Positioning?
A: No. The duty cycle of the pulse output can, however, be changed using the
System Commands "0x20 - Velocity Mode" and "0x22 - Run-to-Position Mode."
FAQ0068
21-Sep-2005
Q: Can the accel/decel rates of the Dynamic Velocity Pulse Profile be increased
to greater than 50,000? (i.e. instantaneous)
A: No. The highest rate is 50,000. If instant change from one frequency to
another is desired you will have to use the Free Form Pulse Profile. This Pulse
Profile has no accel/decel parameters and so you can output a number of pulses
at one frequency and then go instantly to a different number of pulses at a
different frequency. Of course the downside is that you no longer have the
"dynamic" feature of Dynamic Velocity Pulse Profile.
FAQ0069 (see also EBC FAQ0066)
26-Jul-2005
Q: When using H2-CTRIO in H2-EBC100, the Output Active bit for the CTRIO
doesn't come on, however, it works in an H2-EBC.
A: This is a bug caused by the firmware of the H2-EBC100. The DWORD outputs
were not getting written to the CTRIO properly. It is fixed in:
H2-EBC100 firmware v4.0.457 or higher.
FAQ0070
14-Nov-2005
Q: When using Data Smoothing, what do each of the notches mean from "min" to
"max"?
A: From "min" to "max" each notch represents an increasing number of samples
that are averaged together to get a smoothing affect. The exact number of
samples that are averaged respectively from "min" to "max" positions are:
For Rate Data Smoothing (10 slider positions): 1, 2, 3, 5, 7, 10, 13, 17, 21,
25
For Interval Data Smoothing (12 slider positions): 1, 2, 3, 5, 7, 10, 13, 17,
21, 25, 30, 36
FAQ0071
10-Nov-2005
Q: When using Interval Rate Scaling, if Data Smoothing is adjusted to
anything other than Minimum, zero (0) is given in the Scaled Value answer.
A: This is a bug in CTRIOs with firmware that was accidentally introduced in
v2.0.1 and up. Firmware v1.x actually worked! However, we have fixed this
problem in the latest CTRIO firmware (v2.1.15).
FAQ0072 (see also EBC FAQ0072; ERM FAQ0047; SDK FAQ0015)
09-Jan-2006
Q: In my H2-ERM/H2-EBC (or H2-EBC100) configuration, the H2-CTRIO word output
(WO) and double-word output (DWO) mapping is different than where CTRIO
Workbench indicates they should be.
A: This is caused by an I/O mapping problem in the H2-EBC and H2-EBC100 that
is fixed in EBC firmware v2.1.441 and later. It has to do with the H2-CTRIO "I/O
type." The H2-CTRIO is now reported as a Type 7 module instead of a Type 5
module. This new reclassification of the H2-CTRIO as a Type 7 allows the EBC to
manage the order in which things get mapped.
The symptom shows up as a mapping discrepancy in the order in which the CTRIO
puts the DWOs and the WOs VS where the ERM Workbench maps them in PLC memory.
For example, for comparison see the chart below:
|
H2-CTRIO Mapping Component |
H2-CTRIO mapping in H2-EBC (H2-EBC100) with firmware less than v2.1.441 |
H2-CTRIO Mapping in H2-EBC (H2-EBC100) with firmware v2.1.441 or later |
| 96 Discrete Input (DI) |
X340-477 (V40416-40423) |
X340-447 (V40416-40423) |
| 96 Discrete Output (DO) |
Y320-457 (V40515-40522) |
Y320-457 (V40515-40522) |
| 12 Word Output (WO) |
V2100-2113 |
V2110-2123 |
| 8 Double Word Input (DWI) |
V2000-2017 |
V2000-2017 |
| 4 Double Word Output (DWO) |
V2114-2123 |
V2100-2107 |
NOTE: If you update the EBC firmware to fix this
problem, make sure that you are at least using CTRIO Workbench v2.1.10 to
configure the H2-CTRIO.
FAQ0073
03-Jan-2006
Q: Can the Reset Value as configured on the Config I/O page of CTRIO
Workbench be changed on the fly from ladders?
A: No, not that one. Basically there are two Reset Values:
- Hardware Reset Value that is on the Config I/O page of CTIRO Workbench
cannot be changed from ladders. This value is the one that will be written to
the Current Count when a hardware reset is seen (i.e. Input C) as configured.
- Software Reset Value that is the result of using the Reset Bit. This
particular Reset Value is a software-only Reset Value and is the value that is
written to the Current Count when the Reset Bit is set by ladders. This value
can be changed on the fly from ladders using System Function 0x05 "Write reset
value."
FAQ0074
31-Jan-2006
Q: In the S-Curve (& Symmetrical S-Curve) Pulse Profiles, what do the Min
Freq Change and Min Entry Time parameters do?
A: These parameter define the resolution of the S-Curve itself. First of
all, the CTRIO is not designed to be a sophisticated motion control device. When
you use CTRIO Workbench to configure an S-Curve Pulse Profile, Workbench
calculates entries for a table that defines the curve. It is this table that is
downloaded into the CTRIO itself. In other words, the CTRIO itself does not do
complex math "on the fly" to come up with this curve; that would take too much
valuable CTRIO scantime. Instead, the CTRIO is just blindly outputting values
from this predefined table. With that understanding:
Min Freq Change: This is a percentage (between 1-10%) that changes the
vertical frequency resolution of the output curve. In other word, it is the
Y-axis of the graphical representation that you see in CTRIO Workbench. If you
change this value and press the <Calculate Profile> button you will notice the
vertical resolution of the graph changes. With 1% the CTRIO can use more
frequencies and so it is smoother; at 10% the CTRIO will use less frequencies
and so it become very course.
Min Entry Time: This is a time (between 1-255ms) that changes the
horizontal time resolution of the output curve. In other words, it is the X-axis
of the graphical representation that you see in CTRIO Workbench. If you change
this value and press the <Calculate Profile> button you will notice the
horizontal resolution of the graph changes. With 1ms the CTRIO can use smaller
steps and so it is smoother; at 255ms the CTRIO will use less time increments
and so it becomes very course.
Thus, with these 2 parameters you control the smoothness of the CTRIO output
curve. If you make both parameters very small, the S-Curve will look very
smooth, but you also create a bigger table and thus take up more configuration
space in the CTRIO:

If you make both parameters very large, the S-Curve will look very
course, but you also create a smaller table and thus take up very little
configuration space in the CTRIO.

FAQ0075
08-Feb-2006
Q: Will the CTRIO support differential encoder outputs?
A: No. The CTRIO inputs are single-ended in that the M connection is common
to all 4 inputs (A, B, C, D). Tying 2 differential encoder outputs together is not a good
idea so we'd be limited to 1 input at the most (e.g. A and M). Also because of
the sink/source capabilities of the CTRIO inputs, a positive or a negative
signal above 9V threshold would be treated as an ON. So even using a single
differential signal greater than 9V each side of ground (M), the CTRIO would
count both states as ON and therefore count at twice the expected rate. If
distance and electrical noise are the reason for using the differential encoder,
twisted pair wiring is usually good enough because the CTRIO inputs stay OFF at
up to 2 mA and 2V.
FAQ0076
13-Feb-2006
Q: Using quadrature counter at 1X, how does the CTRIO increment counts after
a reset? Does it synchronize to the rising edge of Input A?
A: After a reset, the CTRIO count defaults to the DOWN direction. Thus if
the CTRIO is to count pulses in the UP direction after the reset, then,
depending on the configuration, it may need as much as 4 edges to reestablish
the UP direction. However, if the CTRIO is to count pulses in the DOWN
direction, it will continue without having to reestablish a direction.
For the COUNTING-UP scenario, the rules are:
For 1X quadrature counting: After the reset CTRIO is in the DOWN direction.
It takes 4 edges to reestablish the UP direction. On the 4th edge CTRIO will
increment the count and then from this point onward it will increment the
count on the rising edge of Input A
For 2X quadrature counting: After the reset CTRIO is in the DOWN direction.
It takes 2 edges to reestablish the UP direction. On the 2nd edge CTRIO will
increment the count and then from here it will increment the count when Input
A and Input B are in opposite states or after 2 more edges (which ever comes
first). Then from this point onward it will increment the count when Input A
and Input B are in opposite states.
For 4X quadrature counting: After the reset CTRIO is in the DOWN direction.
It only takes 1 edge to reestablish the UP direction. So CTRIO counts all
edges all the time.
These COUNTING-UP rules are displayed in the following
tables:
Count gets Reset while Input A = 0 and Input B = 0:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 1 |
0 |
0 |
0 |
1 |
| 1 |
1 |
0 |
1 |
2 |
| 0 |
1 |
0 |
1 |
3 |
| 0 |
0 |
1 |
2 |
4 |
| 1 |
0 |
2 |
3 |
5 |
| 1 |
1 |
2 |
3 |
6 |
| 0 |
1 |
2 |
4 |
7 |
| 0 |
0 |
2 |
4 |
8 |
| 1 |
0 |
3 |
5 |
9 |
Count gets Reset while Input A = 1 and Input B = 0:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 1 |
1 |
0 |
0 |
1 |
| 0 |
1 |
0 |
1 |
2 |
| 0 |
0 |
0 |
1 |
3 |
| 1 |
0 |
1 |
2 |
4 |
| 1 |
1 |
1 |
2 |
5 |
| 0 |
1 |
1 |
3 |
6 |
| 0 |
0 |
1 |
3 |
7 |
| 1 |
0 |
2 |
4 |
8 |
| 1 |
1 |
2 |
4 |
9 |
Count gets Reset while Input A = 1 and Input B = 1:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 0 |
1 |
0 |
0 |
1 |
| 0 |
0 |
0 |
1 |
2 |
| 1 |
0 |
0 |
1 |
3 |
| 1 |
1 |
1 |
2 |
4 |
| 0 |
1 |
1 |
3 |
5 |
| 0 |
0 |
1 |
3 |
6 |
| 1 |
0 |
2 |
4 |
7 |
| 1 |
1 |
2 |
4 |
8 |
| 0 |
1 |
2 |
5 |
9 |
Count gets Reset while Input A = 0 and Input B = 1:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 0 |
0 |
0 |
0 |
1 |
| 1 |
0 |
0 |
1 |
2 |
| 1 |
1 |
0 |
1 |
3 |
| 0 |
1 |
1 |
2 |
4 |
| 0 |
0 |
1 |
2 |
5 |
| 1 |
0 |
2 |
3 |
6 |
| 1 |
1 |
2 |
3 |
7 |
| 0 |
1 |
2 |
4 |
8 |
| 0 |
0 |
2 |
4 |
9 |
For the COUNTING-DOWN scenario, the rules are:
For 1X quadrature counting: After the reset CTRIO is in the DOWN direction
therefore it will continue to count down on the falling edge of Input A.
For 2X quadrature counting: After the reset CTRIO is in the DOWN direction
therefore it will continue to count down when Input A and Input B are in the
same state.
For 4X quadrature counting: After the reset CTRIO is in the DOWN direction
therefore it will continue to count down on all edges all the time.
These COUNTING-DOWN rules are displayed in the following
tables:
Count gets Reset while Input A = 0 and Input B = 0:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 0 |
1 |
0 |
0 |
-1 |
| 1 |
1 |
0 |
-1 |
-2 |
| 1 |
0 |
0 |
-1 |
-3 |
| 0 |
0 |
-1 |
-2 |
-4 |
| 0 |
1 |
-1 |
-2 |
-5 |
| 1 |
1 |
-1 |
-3 |
-6 |
| 1 |
0 |
-1 |
-3 |
-7 |
| 0 |
0 |
-2 |
-4 |
-8 |
| 0 |
1 |
-2 |
-4 |
-9 |
Count gets Reset while Input A = 0 and Input B = 1:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 1 |
1 |
0 |
-1 |
-1 |
| 1 |
0 |
0 |
-1 |
-2 |
| 0 |
0 |
-1 |
-2 |
-3 |
| 0 |
1 |
-1 |
-2 |
-4 |
| 1 |
1 |
-1 |
-3 |
-5 |
| 1 |
0 |
-1 |
-3 |
-6 |
| 0 |
0 |
-2 |
-4 |
-7 |
| 0 |
1 |
-2 |
-4 |
-8 |
| 1 |
1 |
-2 |
-5 |
-9 |
Count gets Reset while Input A = 1 and Input B = 1:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 1 |
0 |
0 |
0 |
-1 |
| 0 |
0 |
-1 |
-1 |
-2 |
| 0 |
1 |
-1 |
-1 |
-3 |
| 1 |
1 |
-1 |
-2 |
-4 |
| 1 |
0 |
-1 |
-2 |
-5 |
| 0 |
0 |
-2 |
-3 |
-6 |
| 0 |
1 |
-2 |
-3 |
-7 |
| 1 |
1 |
-2 |
-4 |
-8 |
| 1 |
0 |
-2 |
-4 |
-9 |
Count gets Reset while Input A = 1 and Input B = 0:
|
Input A |
Input B |
Count (1X) |
Count (2X) |
Count (4X) |
| 0 |
0 |
-1 |
-1 |
-1 |
| 0 |
1 |
-1 |
-1 |
-2 |
| 1 |
1 |
-1 |
-2 |
-3 |
| 1 |
0 |
-1 |
-2 |
-4 |
| 0 |
0 |
-2 |
-3 |
-5 |
| 0 |
1 |
-2 |
-3 |
-6 |
| 1 |
1 |
-2 |
-4 |
-7 |
| 1 |
0 |
-2 |
-4 |
-8 |
| 0 |
0 |
-3 |
-5 |
-9 |
FAQ0077
13-Feb-2006
Q: Does the Scan Time of the CTRIO (as indicated in CTRIO Workbench) affect
the response time of the Pulse Output to Presets in the Preset Tables?
A: Yes. There are 3 levels of processing in the CTRIO; (1) hardware
dependant; (2) interrupt dependant and (3) scan time dependant. In the case of
Presets in the Preset Tables that change the state of the Pulse Outputs, this is
handled in the (3) scan time dependant processing. Thus, the maximum time from
reaching a Preset count to a change in the Pulse Output as configured in a
Preset Table is the Scan Time of the CTRIO. For this to be any different the
CTRIO would have to have much faster hardware, which would be more expensive.
Thus for an example:
Count coming into the CTRIO rising-edge counter at a rate of 25 KHz and we
have a Preset Table with an entry of SET at 12 and a CTRIO Scan Time of 600 µs.
- At 25 KHz, that is a rising edge every 1 /
25000 = 0.00004 seconds (or 40 µs)
- The count of 12 will take 12 x 40 µs = 480 µs
- If this event occurred immediately after the
CTRIO had already updated its Pulse Outputs, then it could be about 600 µs
before the Pulse Output was updated. Thus an event that should've happened in
480 µs ended up taking 480 + 600 = 1.08 ms. This would tend to give you a
similar response for all Preset Values that are faster than the Scan Time of the
CTRIO.
FAQ0078
13-Feb-2006
Q: Does the CTRIO have a "follower" mode (i.e. produce a Pulse Output at the
same velocity as an encoder input)?
A: No, there is no intrinsic follower mode for the CTRIO. The only way to
make the CTRIO Pulse Output follow the Rate of a CTRIO counter input is:
- Configure a CTRIO output as a Pulse Output.
- Configure a Dynamic Velocity Pulse Profile.
- Configure a CTRIO Input Channel as a counter and use the Scaling Wizard to
make it yield a Rate.
- In the PLC program, load the Dynamic Velocity Pulse Profile Table.
- In the PLC program load the V-memory for the CTRIO "Scaled Units" and
output that to the V-memory for the CTRIO "Parameter 3" (Velocity).
This should work well in most applications simply because the delay between a
change of Rate on the CTRIO Input to the change of Velocity on the CTRIO Pulse
Output will, at the most, be about 2 PLC scantimes (i.e. in the millisecond
range).
FAQ0079
27-Feb-2007
Q: What is the difference between Edge-Triggering and Level-Triggering?
A: Here are the differences:
EDGE TRIGGERING: The inputs are sampled by the CTRIO hardware every 16 MHz
clock cycle. If the edge exceeds 2V and 2mA, then an edge is reported to the
CTRIO firmware as a trigger interrupt. Thus the CTRIO hardware is totally in
control of the triggering.
LEVEL TRIGGERING: The inputs are sampled by the CTRIO hardware every 16 MHz
clock cycle. If the edge exceeds 2V and 2mA, then a change of state is reported
to the CTRIO firmware. As the CTRIO firmware scans and notices there has been a
change of state from 0 to 1 of one of its inputs, then it "knows" there was a
trigger. Thus the triggering is based not on just an edge detection by the
hardware, but also is somewhat delayed by the scantime of the CTRIO.
Therefore, if edge triggering is falsely being triggered by an excessively
noisy signal, oftentimes changing to level triggering will filter these false
triggers out. However, nothing is a good substitute for a clean signal on the
inputs in the first place.
FAQ0080
09-Mar-2007
Q: Can the configuration of the CTRIO be printed out using CTRIO Workbench?
A: No, but the configuration can be saved in a .CWB file. The only thing
that can be printed out is the I/O map.
|