background image

See page 10 for 

quick start 

 

 
 
 

 

Ethernet Converter Device 

 
 FMod-TCP 

BOX 

 

 

 User 

Manual 

 

 Version 

1.2 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

Summary of Contents for FMod-TCP BOX

Page 1: ...See page 10 for quick start Ethernet Converter Device FMod TCP BOX User Manual Version 1 2 ...

Page 2: ...V Borland is a registered trademark of Borland Software Corporation Warning This device is not intended to be used in medical life support or space products Any failure of this device that may cause serious consequences should be prevented by implementation of backup systems The user agrees that protection against consequences resulting from device system failure is the user s responsibility Chang...

Page 3: ... or UDP 12 General Information 12 RS232 TCP 8000 12 Device parameters and I O A D and I2C features TCP 8010 or UDP 7010 13 Easy IP address config UDP 7010 19 Checksum calculation 20 5 Java Applet 22 Overview 22 Main Config 23 Test A D and I Os 24 Test RS232 25 Test I2C 26 6 Win32 Application 28 Overview 28 RS232 interface 30 Load web files interface 31 Main port interface 32 7 Registers management...

Page 4: ...2 app version 1 0 05 05 06 AG First version Since 1 0 Since 1 0 Since 3 0 1 1 09 06 06 AG Update specifications Text corrections Since 1 0 Since 1 0 Since 3 0 1 2 14 08 06 AG I2C speed correction Warning register bits correction Since 1 0 Since 1 0 Since 3 0 FMod TCP User Manual v 2 8 ...

Page 5: ...rrent Relays 1 A Outputs 1 2 voltage Max voltage to GND 50 V Outputs 3 14 current 0 5 A Outputs 15 16 current 1 A Inputs voltage 15 28 V 5V output current Pin 17 on extension connector 0 4 A Power output current Pin 40 on extension connector 1 A Operating temperature 0 70 C Storage temperature 40 120 C All external pins are protected against destruction by ESD 2kV The power supply input is protect...

Page 6: ... with or without hardware flow control TCP 8000 2 Relays Cut up to 50V 1A 14 24V Outputs High side drivers 16 24V Inputs Digital 24V inputs or analog 12 V 10 bits A D 1 I2C bus 2 wires bus serial bus TCP 8010 UDP 7010 Note Some examples of applications illustrating the use of the FMod TCP family with serial I2C I O and A D devices can be found on the FiveCo s website http www fiveco ch section_mot...

Page 7: ... chapter 4 and 7 The code samples available on the FiveCo s web site can help programmers get started with development Hardware description Power connector 12 32 VDC Inputs Outputs I2C bus Supply voltage 5V and GND RS232 connector Dimensions in mm Ethernet connector SOS button Beware Before connecting any cable to the device shut down power supply Front view RJ45 Ethernet connector SOS button FMod...

Page 8: ...8 28 Output 9 9 Input 9 29 Output 8 10 Input 10 30 Output 7 11 Input 11 31 Output 6 12 Input 12 32 Output 5 13 Input 13 33 Output 4 14 Input 14 34 Output 3 15 Input 15 35 Output 2 B relay 2 16 Input 16 36 Output 2 A relay 2 18 GND 38 Output 1 A relay 1 SDA e max 1A a a Do not supply the device throu s r connector Preliminary Inputs Outputs 3 16 Outputs 1 2 Vpower 47kΩ ication ted by Power connecto...

Page 9: ...utton is dedicated to restore default IP address or factory settings There are tow possible scenarios If you press it while the device is running the IP address will be r l TC tions a have to send the Save Settings command to the device in order to save it into EEPROM estored as soon as al P connec re closed Warning you and factory settings of all parameters will be restored AND saved into EEPROM ...

Page 10: ...and the IP address has been changed to an unknown value you can retrieve an SOS IP address the one on label by pressing the SOS button during the normal operation of the device See section Erreur Source du renvoi introuvable Changing IP address To easily change the factory IP address use the Win32 software provided on the CD Rom 1 Plug your new device on your PC network 2 Start the Win32 applicati...

Page 11: ...ware or open its web page by typing its new IP address into a web browser Notes The IP address won t be changed if a TCP connection exists with the device The protocol used to change the IP address is described later in this manual FMod TCP User Manual v 2 8 ...

Page 12: ...y as a transceiver for this port Any byte sent from the network ex TCP IP from a PC to the module will be sent to the other side s RS232 bus and vice versa Thus there is no particular protocol dedicated to this feature See later chapters to know how to change parameters such as baud rate and hardware flow control Note This port supports only one user at a time RS232 fixed settings No parity 1 Star...

Page 13: ...h you use to access the module The following web page describes this feature in details http www microsoft com resources documentation Windows 2000 server reskit en us regentry 58801 asp frame true Device parameters and I O A D and I2C features TCP 8010 or UDP 7010 The main TCP port number 8010 or UDP port number 7010 can be used to change some important parameters of the module TCP timeout value ...

Page 14: ...ommand Byte Number of bits Example 0x00 Read 0x0021 16 bits 0x0021 0x02 TransactionID 16 bits 0x1B34 0x04 Number of registers to read X 16 bits 0x0001 0x06 X Registers Addresses X 8 bits 0x02 0x06 X Checksum 16 bits 0x The maximum number of registers that can be read at one time is almost 30 The answer sequence should not be greater than 180 bytes If the number of registers is too big the FMod TCP...

Page 15: ...he I C bus is a control bus that provides the communications link between integrated circuits in a system Developed by Philips in the early 1980 s this simple two wire bus has become the de facto worldwide standard for system control finding its way into everything from temperature sensors and voltage level translators to EEPROMs general purpose I O A D and D A converters CODECs and microprocessor...

Page 16: ...he following one Byte Number of bits Example 0x00 I2CReadAnswer 0x0008 16 bits 0x0008 0x02 TransactionID same as demand 16 bits 0x1254 0x04 Number of bytes in answer 16 bits 0x0005 0x06 Answer bytes Y bytes 0x1A25 Ack state of the I2C com 1 byte 0x87 If the same or other I2C slave have been accessed in the command the answer bytes and ack state is added here Checksum 16 bits 0x The Ack state byte ...

Page 17: ...0x04 Number of addresses to scan 16 bits 0x0001 0x08 X Addresses X bytes 0x1A Checksum 16 bits 0x The FMod TCP BOX answers with the following sequence Byte Number of bits Example 0x00 I2CScanAnswer 0x0006 16 bits 0x0006 0x02 TransactionID same as demand 16 bits 0x2001 0x04 Number of valid addresses 16 bits 0x0001 0x06 Valid addresses list n bytes 0x1A Checksum 16 bits 0x Note If there is no addres...

Page 18: ...s at speed higher than 100kHz This feature will therefore not work with all I2C slaves The value of the I2CSPD parameter must be computed with the following formula 1 2 10 2 7 wanted CSpeed I CSPD I The I2C speed cannot be saved in EEPROM FMod TCP User Manual v 2 8 ...

Page 19: ... command Byte Number of bits Example 0x00 Change IP fct 0x002A 16 bits 0x002A 0x02 TransactionID 16 bits 0x0000 0x04 Length of params 0x000E 16 bits 0x000E 0x06 FMod TCP BOX Mac Address 6 bytes 0x0050C2308101 0x0C FMod TCP BOX new IP Address 4 bytes 0xC0A81064 0x10 FMod TCP BOX new SubnetMask 4 bytes 0xFFFF0000 0x14 Checksum 16 bits 0x If the FMod TCP BOX recognizes its MAC address it will answer ...

Page 20: ... is 32bits 0x0000 last result 4 Add last result to the 32 bits accumulator Try the Loop 5 Convert accumulator in two 16bits words 6 Add those two 16bits words result is 16bits word 7 If an overflow occurs with the last addition Carry add 1 to the last result 8 Last result is the final result Example in hexadecimal 0x0021 0XFFDE Æ 0x0000FFDE Read 0x1234 0xEDCB Æ 0x0001EDA9 TransID 0x0003 0xFFFC Æ 0...

Page 21: ...if AddHighByte Sum ByteTab i 8 0xFF00 AddHighByte false else Sum ByteTab i 0x00FF AddHighByte true if AddHighByte false Sum 0xFF ChecksumCalculated Sum 16 0xFFFF Sum 0xFFFF ChecksumCalculated ChecksumCalculated 16 0xFFFF ChecksumCalculated 0xFFFF return ChecksumCalculated This function needs a Byte array ByteTab containing the command sequence and this array s length Size as input it returns the c...

Page 22: ...e with default address http 169 254 5 5 The applet is downloaded from the device to your computer and runs as a local process on your computer You need to use an internet web browser that is compatible with Java 1 1 Please note that on an MSWindowsTM based computer a few seconds delay can occur when you download the applet due to an MSWindowsTM NetBios issue The navigation through the four panels ...

Page 23: ...o change the main settings of the device Don t forget to use the Save user parameters button to make changes permanent The second part allows the user to save restore user and factory parameters and to read the actual configuration of the device if it has been modified by another application FMod TCP User Manual v 2 8 ...

Page 24: ...e The Inputs state and voltage are regularly updated automatically 20 kHz You can change the low to high threshold of the inputs between 0 and 24V This page display also the device supply voltage and warnings Too low high supply voltage Outputs driver over current or temperature FMod TCP User Manual v 2 8 ...

Page 25: ...2 TCP Port you can send ASCII data to RS232 bus and receive data from it only ASCII is visible in this application You can check Add LF Add CR and or Add Null boxes to add a Line Feed a Carriage Return and or a Null Byte at the end of the ASCII chain sent to the device FMod TCP User Manual v 2 8 ...

Page 26: ...ws scanning the I2C bus to find available slave devices The part on the left allows sending a read or a write command to a device on the I2C bus You should first check if you want a read or a write Then you have to write hex data to write to the device in the Hex data to write field if you FMod TCP User Manual v 2 8 ...

Page 27: ...BOX will use the read after write I2C feature After writing the I2C address 7bits hexa and the number of bytes to read if applicable click on the Send button The answer is displayed in hex in the Data received field FMod TCP User Manual v 2 8 ...

Page 28: ...on the module the user has to set the correct IP address of the module to choose the correct TCP port in the list and to click on the Open button To close the port simply click on the Close button The status bar displays the status of the connection Connected Disconnected Error of connection if connection was not established within 30s Note If you forgot the IP address of the module you can use th...

Page 29: ...l devices in your subnet and answers will be listed WARNING it only works with devices in your subnet How does it work When you click Scan the software simply sends a Read registers command to a broadcast address on UDP port number 7010 see chapter about main port at page 13 The broadcast address depends on the network subnet mask present on your PC FMod TCP User Manual v 2 8 ...

Page 30: ...ed from RS232 The RS232 interface is easy to use Just write the ASCII HEX or decimal string in the dedicated text box and click corresponding Send button The received bytes are displayed into the Data received boxes same data but different representation FMod TCP User Manual v 2 8 ...

Page 31: ...ir personal web files html java jpeg gif txt into the flash memory A maximum of 44kB is available for that application An example of pages and Default Java Applet code is available on the Starter Kit CDRom or on the FiveCo s web page For factory web upload the user can save a single file yourname web See FMod TCP BOX_WebPageUploading manual on the FiveCo web site FMod TCP User Manual v 2 8 ...

Page 32: ...the RS232 baud rate and enable or disable the hardware flow control CTS RTS TCP timeout The user can change the number of seconds allowed before TCP port is disconnected This feature avoids the problems due to the crash of a TCP client PC IP address The user can change the IP address of the module Subnet mask The user can change the subnet mask of the module MAC address Mac address of the module c...

Page 33: ... the bytes in hexadecimal like 41 42 45 separated by spaces must be written in the dedicated line and the I2C address in the dedicated Address space in hexadecimal or in decimal Then click Send In Read mode the steps are the same except that the user must specify how many bytes have to be read Data to write is optional only used for ReadAfterWrite I2C method FMod TCP User Manual v 2 8 ...

Page 34: ...LE DATA EEPROM EEPROM ROM USER Parameters Saved FACTORY Parameters Saved SOS IP address 5 1 2 3 4 VOLATILE DATA RAM RUNNING WRITE Parameters READ PROCESSES Communication port TCP UDP Web page or Software Action Number and description 1 SaveUserParameters 0x03 function During standard power up or calling 2 RestoreUserParameters 0x04 function 3 RestoreFactoryParameters 0x05 function SaveFactoryParam...

Page 35: ...x16 22 1 RS232CONFIG 0x18 24 1 I2CSPD 0x1A 26 1 TCPCONNECTIONSOPENED I Os and AD 0x20 32 4 ANALOGINPUTSTHRESHOLD 0x21 33 2 OUTPUTS 0x23 35 2 INPUTS Analog voltage at inputs 0x30 48 4 INPUTVOLTAGE0VALUE 0x31 49 4 INPUTVOLTAGE1VALUE 0x32 50 4 INPUTVOLTAGE2VALUE 0x33 51 4 INPUTVOLTAGE3VALUE 0x34 52 4 INPUTVOLTAGE4VALUE 0x35 53 4 INPUTVOLTAGE5VALUE 0x36 54 4 INPUTVOLTAGE6VALUE 0x37 55 4 INPUTVOLTAGE7V...

Page 36: ...ture 4 Bytes Unsigned Int 16bits HH HL TYPE Unsigned Int 16bits LH LL MODEL Description Product identifier composed with a Type and Model number It defines which kind of peripheral it is Normally different modules TYPE are not software compatible Example TYPE 0x00080000 means Type 8 FMod TCP BOX Model 0 FMod TCP User Manual v 2 8 ...

Page 37: ...6bits LH LL Revision Description Firmware identifier composed with a Version and Revision number Same Version with different Revision is backward compatible Example Firmware 0x0001000A Version 1 Revision 10 is compatible with all earlier revisions of the same version ver 1 0 to 1 9 However it has new functionalities which are deactivated by default or code optimizations FMod TCP User Manual v 2 8 ...

Page 38: ...ss Function Name Function Read Write Control 0x02 RESETCPU Restart processor Write only Register Size Register structure Unit 0 Byte none none Description Reboots the device The communication will be lost FMod TCP User Manual v 2 8 ...

Page 39: ...rol 0x03 SAVEUSERPARAMETERS Saves all in EEPROM Write only Register Size Register structure Unit 0 Byte none none Description Saves the following parameters to user EEPROM space 0x12 IPADDRESS 0x13 SUBNETMASK 0x14 TCPTIMEOUT 0x15 MODULENAME 0x16 RS232CONFIG FMod TCP User Manual v 2 8 ...

Page 40: ...0x04 RESTOREUSERPARAMETERS Restores saved values Write only Register Size Register structure Unit 0 Byte none none Description Restores the following parameters from user EEPROM space 0x12 IPADDRESS 0x13 SUBNETMASK 0x14 TCPTIMEOUT 0x15 MODULENAME 0x16 RS232CONFIG FMod TCP User Manual v 2 8 ...

Page 41: ...egister Size Register structure Unit 0 Byte none none Description Restores the following parameters from factory EEPROM space 0x12 IPADDRESS 0x13 SUBNETMASK 0x14 TCPTIMEOUT 0x15 MODULENAME 0x16 RS232CONFIG Note SAVEUSERPARAMETERS should be performed after this function in order to save restored parameters as user parameters FMod TCP User Manual v 2 8 ...

Page 42: ...ly Register Size Register structure Unit 0 Byte none none Description Saves the following parameters to factory EEPROM space 0x12 IPADDRESS 0x13 SUBNETMASK 0x14 TCPTIMEOUT 0x15 MODULENAME 0x16 RS232CONFIG Note This feature should only be used by a system integrator that would change the initial factory default settings FMod TCP User Manual v 2 8 ...

Page 43: ... Max 0x7FFFFFFxx 32 767 996 Min 0x000000xx 0 0 Step 0x000001xx 0 004 Example When read 0x00234567 2311527 Voltage 35 27 2311527 655636 Information Over 32 V 0x00200000 the overvoltage warning bit is set and the overvoltage protection diode should increase power current Below 12 V 0x000C0000 the undervolatge warning bit is set Below effective 6 5 V 0x00068000 this value has no meaning Active Each t...

Page 44: ...he next one shows if this state appeared previously Only the bits that show the past states can be cleared by writing 0x00000000 to WARNING register Bits when set 0 1 Over temperature occurred on outputs stage 2 3 Over current occurred on outputs stage 4 5 Under voltage of the power input 6 7 Over voltage of the power input Other bits are reserved If any warning bit is set the LED on the SOS butto...

Page 45: ...gister Name Function Read Write Control 0x10 COMOPTIONS Communication options Read Write Register Size Register structure Unit 4 Bytes 32 individual bits none Description This register is reserved for future use FMod TCP User Manual v 2 8 ...

Page 46: ...ster Size Register structure Unit 6 Bytes 6 x Unsigned Bytes none Description A standard hardware unique identifier worldwide for each device on an Ethernet network Note If the user writes into this register the MAC address will not be modified This register is available only for informational purposes FMod TCP User Manual v 2 8 ...

Page 47: ... TCP IP and UDP IP The values 255 0xFF and 0 0x00 are reserved for broadcast and network addresses and should not be used in this register Notes The module will change for a new IP address only when all of its communications ports are closed Do not forget to use a SAVEUSERPARAMETERS command Default value 169 254 5 5 Example For the IP 192 168 16 14 0xC0 0xA8 0x10 0x0E write 0xC0A8100E to IPADDRESS...

Page 48: ...bnet mask only when all of its communications ports are closed Do not forget to use a SAVEUSERPARAMETERS command If you do not want to use subnets use the following subnet mask when IP address byte 0 is 0 and 127 255 0 0 0 Class A addresses 127 and 191 255 255 0 0 Class B addresses 191 and 223 255 255 255 0 Class C addresses Default value 255 255 0 0 Example For the IP 10 2 6 45 and subnet mask 25...

Page 49: ...the value is 0 the TCP timeout is deactivated In this case however if the client crashes during connection the communication will never be closed on the module s side Because a maximum of 4 communications are allowed at the same time on the module one of them will be blocked If the client crashes four times all of the 4 communications will be blocked and the module will have to be reset The timeou...

Page 50: ...ame Read Write Register Size Register structure Unit 16 Bytes 16 only x Unsigned Bytes CHAR none Description Name and or description of the module Example For the name Hello Module extend to 16 byte the name Hello Module 5x space 16 Byte So write 0x48656C6C 6F204D6F 64756C65 20202020 FMod TCP User Manual v 2 8 ...

Page 51: ...ture Unit 1 Byte Unsigned Int 8 bits none Description RS232 baud rate and flow control configuration Bits 0 2 Baud rate configuration 0 4800 bds 1 9600 bps default 2 19200 bps 3 38400 bps 4 57600 bps 5 115200 bps 6 115200 bps 7 115200 bps Bits 3 6 Reserved Bit 7 Hardware flow control bit 0 disabled 1 enabled Default value 1 9600 bps without flow control FMod TCP User Manual v 2 8 ...

Page 52: ...tting between 39kHz and 400kHz The value of this parameter must be computed with the following formula based on the wanted speed 1 2 10 2 7 wanted CSpeed I CSPD I Note Speeds greater than 100kHz have some limitations see page 17 Do not use a speed greater than 400kHz 24 Greater speed will not work Default value 99 100kHz Examples Most common speeds 100kHz I2CSPD 99 400kHz I2CSPD 24 FMod TCP User M...

Page 53: ...ad Write Control 0x1A TCPCONNECTIONSOPENED Number of TCP connections that are opened Read only Register Size Register structure Unit 1 Byte Unsigned Int 8 bits none Description Number of users connected to the device using TCP Value can be 0 to 4 FMod TCP User Manual v 2 8 ...

Page 54: ...Read Write Register Size Register structure Unit 4 Bytes Signed 2 s cplt Int 16 HH HL 16 bits fixed point LH LL Volt Description Defines the threshold used by the AD converter on inputs pins to define input state as low or high 0 or 1 Default 6 0 V Example If your inputs use 5V TTL signals set this value between 1 and 4 V FMod TCP User Manual v 2 8 ...

Page 55: ...nputs pin The state is defined by comparing actual input voltage with the ANALOG INPUTS THRESHOLD Bit 0 INPUT 1 Bit 1 INPUT 2 Bit 2 INPUT 3 Bit 3 INPUT 4 Bit 4 INPUT 5 Bit 5 INPUT 6 Bit 6 INPUT 7 Bit 7 INPUT 8 Bit 8 INPUT 9 Bit 9 INPUT 10 Bit 10 INPUT 11 Bit 11 INPUT 12 Bit 12 INPUT 13 Bit 13 INPUT 14 Bit 14 INPUT 15 Bit 15 INPUT 16 Example b 0000 0000 0000 0111 Æ Inputs number 1 2 and 3 are high ...

Page 56: ...ontrols the state of each of the output pins Bit 0 OUTPUT 1 Relay A Bit 1 OUTPUT 2 Relay B Bit 2 OUTPUT 3 Bit 3 OUTPUT 4 Bit 4 OUTPUT 5 Bit 5 OUTPUT 6 Bit 6 OUTPUT 7 Bit 7 OUTPUT 8 Bit 8 OUTPUT 9 Bit 9 OUTPUT 10 Bit 10 OUTPUT 11 Bit 11 OUTPUT 12 Bit 12 OUTPUT 13 Bit 13 OUTPUT 14 Bit 14 OUTPUT 15 Bit 15 OUTPUT 16 Example b 0000 0000 0000 0111 Æ Outputs number 1 2 and 3 are high and others are low F...

Page 57: ...nt 16 HH HL 16 bits fixed point LH LL Volt Description Voltage value of the 16 inputs pins between 12V and 12V This value saturates at 15 5V and 24V Notes The A D converter has a 10 bits resolution 0 43V The acquisition is done every 850µs and is asynchronous with the read access of the A D VALUE registers When you access this register you get the last A D conversion result which can be up to 850µ...

Page 58: ...58 58 FMod TCP User Manual v 2 8 Contact address FiveCo Innovative Engineering PSE C CH 1015 Lausanne Switzerland Tel 41 21 693 86 71 Fax 41 21 693 86 70 www fiveco ch info fiveco ch ...

Reviews: