SDK FAQs
(Last Update: 31-Dec-2009, SDK FAQ0022)

SDK FAQ0001 (see also EBC FAQ0012, ERM FAQ0007)
29-Jan-2003
Q: How do you determine what state the outputs will go to if comm is lost on the EBC?
A: If using the SDK, this can be set with the subroutine HEIWriteSetupData. If using ERM WorkBench the watchdog has a timeout value and by default it is set to freeze outputs if comm is lost.. However, you can also set it to disable all outputs if watchdog fires.


SDK FAQ0002
17-Jul-2002
Q: Need the SDK, but not for Windows and not for C.
A: To get the SDK to work on other platforms besides Windows, or to port it to a different programming language (e.g. Java), you should request the source code and then compile it on your system. Source code request form:

http://www.hosteng.com/Ethernet%20SDK/Ethernet%20SDK.htm

Scroll to the bottom of the page and fill out form. Then press "Submit."


SDK FAQ0003
20-Mar-2003
Q: Does the SDK have any ActiveX controls?
A: No, but we have had customer's use the SDK and build their own ActiveX controls.


SDK FAQ0004
12-May-2003
Q: In the SDK specification (Host Ethernet Interface Specification), the Terminator I/O module IDs are not listed.
A: These are listed in the latest version of this specification, available for download at:

http://www.hosteng.com/Ethernet%20SDK/Ethernet%20SDK.htm

Scroll down to "Host Ethernet Interface Specification Version 2" dated 07 March 2003 and download it. It is a PDF file.


SDK FAQ0005
08-Oct-2003
Q: What is the latest version of the API being used by the Ethernet SDK?
A: The API filename is HEI32_3.DLL and as of 4Q 2003 the latest version is v1.3.0.154.


SDK FAQ0006 (see also ERM FAQ0025; EBC FAQ0042)
07-Oct-2002
Q: My EBC outputs sometimes go OFF intermittently; at the same time the Error light on the EBC comes on.
A: When the Error light comes ON, this indicates that the watchdog circuit in the EBC has fired. By default the EBC's watchdog is set to 250ms. This means that if the EBC doesn't get a communication from its master (e.g. ERM; Entivity; Ethernet SDK app; KEPDirect; etc.) within 250ms then it will fire. When the watchdog fires the outputs in the EBC base will all be switched OFF for safety purposes. The watchdog time can be set via the master configuration software (e.g. ERM Workbench; Entivity; etc.). It can also be disabled. If the watchdog is disabled then the outputs in the EBC base will simply freeze to their last state before the watchdog fired.

Thus in the case above where the outputs appear to go OFF intermittently, this is probably due to the watchdog time being too small for the application scan time. So either disable the watchdog totally (NOT RECOMMENDED FOR SAFETY REASONS), or adjust the time to a higher value.


SDK FAQ0007 (see also ECOM FAQ0035)
23-Mar-2004
Q: Do you have any examples using Visual Basic talking to the ECOM?
A: Yes. You need to download the Ethernet SDK (free!) from our website:

http://www.hosteng.com/Ethernet%20SDK/Ethernet%20SDK.htm

Scroll down and download the "Ethernet SDK (Win32 Version)." It is about 1 MByte. It includes examples in both Visual C++ and Visual Basic.


SDK FAQ0008 (see also EBC FAQ0051)
03-Dec-2002
Q: Using the T1F-14THM thermocouple module; how do I convert the returned hexadecimal value into a decimal temperature?
A: The EBC that the T1F-14THM module is plugged into has already converted it to a temperature in the Visual Basic data type called "long." But, if you want to convert a hexadecimal to a decimal number you would use something like:

Val(string)

Where string is a hexadecimal number like "&H10FA."


SDK FAQ0009 (see also WinPLC FAQ0022)
10-Dec-2002
Q: Is there an SDK for the WinPLC?
A: Yes, but you must e-mail us (SDKSupport@hosteng.com) to request a copy of it.


SDK FAQ0010 (see also EBC FAQ0050)
14-Apr-2003
Q: Using the Ethernet SDK's EBCDemo.EXE but getting "????" for analog module F2-08DA-2 installed in H2-EBC.
A: This is because the EBCDemo.EXE was created before the F2-08DA-2 module was created; so it doesn't know exactly what it is. Also make sure you have at least H2-EBC firmware version v2.1.128 to support this newer analog module.


SDK FAQ0011
21-Apr-2003
Q: My call to HEICCMRequest function is taking 100% of CPU Time.
A: Your application probably has a tight loop waiting on a response from HEICCMRequest API call; this is what is taking all the CPU Time. See our example as to how to implement this call properly.


SDK FAQ0012 (see also ECOM 0028; EBC FAQ0033, ERM FAQ0020, EDRV FAQ0007, EZ Ethernet FAQ0017; DirectSOFT FAQ0181; DS Data FAQ0088; NetEdit FAQ0013)
20-Nov-2003
Q: What Ethernet protocols are used by your products?
A: Refer to chart below:

Product Ethernet Protocols
UDP/IP IPX TCP/IP Raw Ethernet Broadcast (1)
K-seq DirectNet ECOM (2) Koyo Backplane User Defined Data Proprietary (1) K-seq DirectNet ECOM (2) Proprietary (1) Modbus TCP Master Modbus TCP Slave Proprietary (1) Koyo Backplane
Hardware ECOM ü ü ü ü (3) ü (4)   ü ü ü         ü (5)
ECOM100 ü ü ü ü (3) ü (4)   ü ü ü   ü (6) ü   ü (5)
EBC           ü       ü        
EBC100           ü       ü   ü    
ERM           ü (7)       ü (7) (8)      
EDRV           ü       ü   ü (12)    
EZ Ethernet ü ü ü       ü ü ü          
EZ EtherPLUS ü ü ü       ü ü ü   ü      
WinPLC                         ü  
Software DirectSOFT ü ü ü       ü ü ü          
DS Data ü ü ü       ü ü ü          
Ethernet SDK ü (9) ü       ü ü (9) ü   ü        
NetEdit ü (10)         ü (11) ü (10)     ü (11)        

(1)  Not an industry standard. However, protocol is available for 3rd-party development upon request.
(2)  Not really a distinct protocol. This setting is used to intelligently pick K-sequence or DirectNet as needed by the hardware/software.
(3)  Used when doing ECOM-to-ECOM via RX/WX instructions with RX/WX Node Map configured in sending ECOM.
(4)  Used when doing ECOM-to-PC (Report-by-Exception) via RX/WX instructions (Address 90 only) with ECOM's dipswitch 7 set ON.
(5)  Used when doing ECOM-to-ECOM via RX/WX instructions without RX/WX Node Map configured in sending ECOM.
(6)  RX/WX Node Map must be configured in ECOM.
(7)  ERM can talk to one slave with UDP/IP and another with IPX simultaneously.
(8)  Planned for Dec2004-Feb2005.
(9)  Requires K-sequence protocol spec (request from Automation Direct)
(10)  Uses K-sequence to perform "Test CPU Access!" function.
(11)  Uses this protocol to perform "Show Base Contents..." function.
(12)  The older HA-EDRV2 cannot talk Modbus TCP.


SDK FAQ0013 (see also CTRIO FAQ0013; EBC FAQ0048; ERM FAQ0031; WinPLC FAQ0029)
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.


SDK FAQ0014 (see also EBC FAQ0071; ERM FAQ0046)
09-Aug-2005
Q: Why can I not see negative temperatures with my T1F-14THM and T1F-14RTD modules?
A: This is because of a fundamental design difference between the THM/RTD modules and all other analog modules in Terminator I/O. Technically all other analog modules in the Terminator I/O line output 24-bit data onto the Terminator I/O bus. The T1H-EBC/T1H-EBC100 looks at the 24th bit and then sign extends this bit to the 32nd bit. This allows 32-bit negative numbers to be viewed from all other analog modules. However, the T1F-14THM and T1F-14RTD modules only output 16-bit data onto the Terminator I/O bus. Thus when the T1H-EBC/T1H-EBC100 looks at the 24th bit, it never sees this bit set, and so the sign extension is always with a cleared bit to the 32nd bit. Thus all 32-bit negative numbers from this configuration will always be positive. Some suggested solutions are given below this diagram:

Therefore, whatever is reading the values of the THM/RTD module from the EBC/EBC100 will have to manipulate the data in order to make it negative. For example:


SDK FAQ0015 (see also CTRIO FAQ0072; EBC FAQ0072; ERM FAQ0047)
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.


SDK FAQ0016
21-Jun-2007
Q: Is the Ethernet SDK file hei32_2.DLL a "signed version" for WinVista?
A: Unfortunately, no, not yet. We are hoping to have this some time in 2008.


SDK FAQ0017
11-Sep-2007
Q: Is there a command in the Ethernet SDK to change the mode of the PLC? (i.e. RUN to PROGRAM and vise versa).
A: No. The Koyo NDA (Non-Disclosure Agreement) makes this propietary.


SDK FAQ0018 (see also ECOM FAQ0101)
17-Sep-2007
Q: Using RBE (Report-by-Exception) application, what are the first 13 bytes in the Ethernet telegram?
A: These bytes are our own protocol and cannot be removed from the telegram. Their basic structure:

Bytes 1-3 = ASCII "HAP" (Host Automation Products)
Bytes 4-5 = Application Value (This value is generated by the ECOM/ECOM100 to help it keep up with the telegrams)
Bytes 6-7 = CRC or zero
Bytes 8-9 = Length (# of bytes following)
Byte 10 = 0x32 or 0x33 (Function Command requires no ACK, or Function Command requires ACK)
Bytes 11-13 = zero


SDK FAQ0019  (see also EBC FAQ0077; ECOM FAQ0102; ERM FAQ0051; NetEdit FAQ0034)
15-Oct-2007
Q: How can I enable the "fast response mode" of the T1F-08AD-1 or T1F-08AD-08AD-2?
A: The fast response mode of these devices is activated by a write to a special location in the T1H-EBC or T1H-EBC100 called Config Data. This area of memory is not available to the ERM nor NetEdit and therefore cannot be configured with ERM Workbench, nor NetEdit.

If using T1H-EBC:
- Currently, the only way to write to the Config Data of the T1H-EBC is to use the Ethernet SDK routine HEIWriteConfigData. The Ethernet SDK is free and downloadable from http://www.hosteng.com/Ethernet_SDK.htm.

If using T1H-EBC100:
- Currently, there are 2 ways to write to the Config Data of the T1H-EBC100:
     (1) Use the Ethernet SDK routin HEIWriteConfigData. The Ethernet SDK is free and downloadable from http://www.hosteng.com/Ethernet_SDK.htm.
     (2) Use Modbus TCP. The Config Data is mapped into the Modbus TCP memory range 50021-50052 (or 410021-410052 for 6-digit addressing). This range is 32 words (1 word for each slot). The bits of the word are defined as follows for the analog input cards:

Bits 0-4:    0 = All channels enabled; 1-31 = Number of channels enabled starting with channel 1
Bits 5-6:    Reserved
Bit 7:         0 = Normal response; 1 = Fast response
Bits 8-15:  Reserved


SDK FAQ0020 (see also ECOM FAQ0042; DirectSOFT FAQ0048; DL Plus FAQ0009; DNLoader FAQ0010; DSData FAQ0005; EZ Ethernet FAQ0008; HA-TADP FAQ0002; Lookout Direct FAQ0014; NetEdit FAQ0005)
31-Jan-2008
Q: Why doesn't the ECOM use subnet mask or gateway address like the ECOM100?
A: Since the ECOM doesn't do "master"-type communications, it doesn't use the subnet mask or gateway address. Whatever talks to the ECOM will be using IPX or UDP/IP, and the ECOM simply swaps the destination and source addresses in the telegram and responds in this way, not "caring" about the subnet or gateway. However, the ECOM100 acts more like a conventional TCP/IP device. The ECOM100 has the capability to be a master and has a full-blown TCP stack inside. Thus, if it is to transmit to an IP address not on its subnet, it will, of course, transmit to its configured gateway address instead.


SDK FAQ0021
03-Feb-2009
Q: Can V-memory in DL PLC be accessed randomly? (i.e. not sequential)
A: No. HEICCMRequest only has provision for data type, offset and length (in bytes; max 256).


SDK FAQ0022 (see also CTRIO FAQ0045; DirectSOFT FAQ0132; DL Plus FAQ0010; DNLoader FAQ0011; DS Data FAQ0102; EBC FAQ0083; ECOM FAQ0084; EDRV FAQ0084; ERM FAQ0058; EZ Ethernet FAQ0010; General FAQ0004; HA-TADP FAQ0008; Lookout Direct FAQ0015; NetEdit FAQ0037; PBC FAQ0014; PSCM FAQ0003; SERIO FAQ0004; WinPLC FAQ0038)
31-Dec-2009
Q: What is the export classification of your products (e.g. ECCN)
A: None of our products have an ECCN. Automation Direct sells our products and they export EAR99 NLR (No License Required). ECCN is Export Controlled Classification Number and none of our products are controlled.