background image

FMod-TCP BOX User Manual v.2.1 

 

 

 

 

 

Ethernet Converter Device 

 

 

FMod-TCP BOX 2 

 

 

 

User Manual 

 

 

Version 2.4 

 

 
 

 
 
 

 
 

 
 

 
 
 

 
 

 
 

 

See page 12 for 

quick start 

Summary of Contents for FMod-TCP BOX 2

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

Page 2: ......

Page 3: ...ademark of Philips Semiconductors Corporation Borland is a registered trademark of Borland Software Corporation Safari is a registered trademark of Apple Inc 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 ag...

Page 4: ...P BOX 2 by TCP or UDP 14 General Information 14 RS232 TCP 8000 14 Device parameters and I O A D and I2C features TCP 8010 or UDP 7010 15 Easy IP address config UDP 7010 21 Checksum calculation 21 5 Java Applet 24 Overview 24 Main Config 25 Test A D and I Os 26 Test RS232 27 Test I2C 28 6 Win32 Application 29 Overview 29 RS232 interface 31 Load web files interface 32 Main port interface 33 7 Regist...

Page 5: ... 3 0 1 6 28 10 08 AG AD resolution correction Since 1 0 Since 1 0 Since 3 0 1 7 15 07 10 AG Add I2C error answer message Small text corrections Add comments about EEPROM registers saving Since 1 8 Since 1 2 Since 3 6 1 8 27 08 10 AG Correction of Inputs and Outputs registers address in their description Since 1 8 Since 1 2 Since 3 6 2 0 10 06 11 AG Update for Fmod TCP BOX 2 device specs Since 2 0 ...

Page 6: ...ll outputs and supply pins of extension connector altogether 3 7 A Inputs voltage 15 28 V Outputs 1 2 current Relays 1 A Outputs 1 2 voltage Max voltage to GND 50 V Outputs 3 14 current 0 15 A Outputs 15 16 current 0 3 A Outputs 3 16 voltage Vdd 0 5 V 5V current Voltage drops if max is exceeded 0 3 A Power output current Voltage drops if max is exceeded 1 A Power outputs voltage Vdd 0 5 V Operatin...

Page 7: ...one through the following interfaces Qty Type Description Port 1 RS232 Up to 115200 bps with or without hardware flow control TCP 8000 2 Relays Cut up to 50V 1A TCP 8010 UDP 7010 14 24V Outputs High side drivers 16 24V Inputs Digital 24V inputs or analog 15 V to 28 V on 10 bits A D 1 I2C bus 2 wires serial bus Note Some examples of applications illustrating the use of the FMod TCP family with seri...

Page 8: ...parameters and to access I O and A D features the protocol uses an Internal Registers Access routine see chapter 4 and 7 The code samples available on the FiveCo s web site can help programmers get started with development Hardware description Beware Before connecting any cable to the device shut down power supply RS232 connector Inputs Outputs I2C bus Supply voltage 5V and GND SOS button Power co...

Page 9: ...ice Inputs Outputs I2C Supply voltage 5V and GND 1 Input 1 21 Output 16 2 Input 2 22 Output 15 3 Input 3 23 Output 14 4 Input 4 24 Output 13 5 Input 5 25 Output 12 6 Input 6 26 Output 11 7 Input 7 27 Output 10 8 Input 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 A ...

Page 10: ...ross talk Use also shorter cable as possible Right side The RS232 connector is the same as the ones found on any computer SOS button A button 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 restored as soon as all TCP connections are closed Warning you have to send the Save Settings c...

Page 11: ...EEPROM In this case you do not need to send the Save Parameters command ...

Page 12: ...s 4 The software will scan the network and display a list of all FiveCo s devices found 5 Select the MAC address corresponding to your new device 6 If you have more than one network adapter on your PC the software will ask you to select the one which is connected to the same network as the FMod TCP BOX 2 7 The software will suggest a new IP address with the last byte left open Choose a new IP Not ...

Page 13: ...Win32 software 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 ...

Page 14: ...ply 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 St...

Page 15: ...face name is the registry name 32 digits number of your Ethernet card which 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...

Page 16: ... The answer contains the same Transaction ID as the corresponding command sent The user is also able to check execution of each command Warning The maximum length of parameters is 172 on this board Pay attention to not exceed this value in question AND answer frame This implies that the maximum registers that can be read at one time are almost 30 depending on registers size If the number of regist...

Page 17: ...d for every register that has been asked for reading Checksum 16 bits 0x Write register s answer The device answers with the following sequence Byte Number of bits Example 0x00 Write Answer 0x0024 16 bits 0x0024 0x02 TransactionID same as demand 16 bits 0x1B34 0x04 0x0000 16 bits 0x0000 0x06 Checksum 16 bits 0x I2C feature The Inter IC bus commonly known as the I C bus is a control bus that provid...

Page 18: ...e four previous entries can be replicated to access the same or other I2C slaves within this command sequence Checksum 16 bits 0x The FMod TCP DB translates automatically those commands to I2C sequences If X 0 the Read method is used If Y 0 the Write method is used If X Y 0 the Read after Write method is used Warning Please check that 240 3 2 Y X In other case the command will be ignored by the bo...

Page 19: ... 1 Bytes written ack each byte was acked 0 Bytes not acknowledged 1 ack received 2 Address ack in read sequence 0 No answer to this address 1 ack received 3 6 Reserved 7 Must be always 1 1 The user can use these bits to check for the presence of his I2C devices and monitor hardware issues I2C Read Write with ack error answer If an error occurred the answer sequence is the following one Byte Number...

Page 20: ...nAnswer 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 I2C speed change advanced features The I2C bus speed can be changed at any time by changing the content of the I2CSPD parameter Beware 1 Do not change I2C speed if it is not mandatory Speed greater than 100kHz are no...

Page 21: ...IP fct 0x002A 16 bits 0x002A 0x02 TransactionID 16 bits 0x0000 0x04 Length of params 0x000E 16 bits 0x000E 0x06 Device Mac Address 6 bytes 0x0050C2308101 0x0C Device new IP Address 4 bytes 0xC0A81064 0x10 Device new SubnetMask 4 bytes 0xFFFF0000 0x14 Checksum 16 bits 0x If the FMod TCP BOX 2 recognizes its MAC address it will answer this command with a simple acknowledges and change its IP address...

Page 22: ...esult 8 Last result is the final result Example in hexadecimal 0x0021 0XFFDE 0x0000FFDE Read 0x1234 0xEDCB 0x0001EDA9 TransID 0x0003 0xFFFC 0x0002EDA5 3 reg to read 0x0A10 0XF5EF 0x0003E394 reg 0A 10 02 0x02 00 0XFDFF 0x0004E193 Note that in this case a last 00 is implicitly used 02 02 00 0x0004 0xE193 0xE197 carry 0 0xE197 carry 0xE197 Checksum 0xE197 Here is an example of a checksum calculation ...

Page 23: ...FFFF 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 checksum as an int ...

Page 24: ...b browser and type the IP address of the module Example 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 Most of browsers support Java 1 1 without plugin but if yours does not display the applet please download the Sun Java plugin at t...

Page 25: ...the user to 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 ...

Page 26: ...tputs state 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 displays also the device supply voltage and warnings Too low high supply voltage Outputs driver over current or temperature ...

Page 27: ...ct to RS232 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 ...

Page 28: ...o 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 checked the Read box the FMod TCP BOX 2 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 ...

Page 29: ...rrect 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 the Scan network feature of the Connection menu IP address of the module TCP port number ...

Page 30: ...sent to all 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 15 The broadcast address depends on the network subnet mask present on your PC ...

Page 31: ...he 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 Bytes received from RS232 Send ASCII Hex or Decimal chain chain to send ...

Page 32: ...t 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 web page upload manual on the FiveCo web site File s list operations Number of bytes in list Load files into module Create file for factory upload List of files to load ...

Page 33: ...r can change the subnet mask of the module MAC address Mac address of the module cannot be changed Name Module name The Inputs state and voltage are simply obtained with a click on the corresponding Read button The Outputs state and the analog threshold are send to the device with a click on the corresponding Write button Change IP address of the module Change RS232 baud rate and flow control Modu...

Page 34: ...dule and the user s electronic The bytes to write 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 Specify how many bytes have to be read and then click Send ...

Page 35: ... Action Number and description SaveUserParameters 0x03 function During standard power up or calling RestoreUserParameters 0x04 function RestoreFactoryParameters 0x05 function SaveFactoryParameters 0x06 function For integrators engineers only By setting SOS Jumper after power up By setting SOS Jumper during power up EEPROM FACTORY Parameters Saved 2 3 EEPROM USER Parameters Saved 4 1 ROM SOS IP add...

Page 36: ...FIG 0x18 24 1 RW I2C SPD 0x1A 26 1 R TCP CONNECTIONS OPENED I Os and AD 0x20 32 4 RW ANALOG INPUTS THRESHOLD 0x21 33 2 RW OUTPUTS 0x23 35 2 R INPUTS Analog voltage at inputs 0x30 48 4 R INPUT VOLTAGE 0 VALUE 0x31 49 4 R INPUT VOLTAGE 1 VALUE 0x32 50 4 R INPUT VOLTAGE 2 VALUE 0x33 51 4 R INPUT VOLTAGE 3 VALUE 0x34 52 4 R INPUT VOLTAGE 4 VALUE 0x35 53 4 R INPUT VOLTAGE 5 VALUE 0x36 54 4 R INPUT VOLT...

Page 37: ...igned 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 Model 0 FMod TCP BOX TYPE 0x00080000 means Type 8 Model 2 FMod TCP BOX 2 ...

Page 38: ...sion are composed with a Version and Revision number Same Version with different Revision is backward compatible MSB contains version number and LSB contains revision number Example 0x02000201 Hardware 2 0 Firmware 2 1 Hardware Version 2 Revision 0 Firmware Version 2 Revision 1 is compatible with all earlier revisions of the same version ver 2 0 in this case However it has new functionalities whic...

Page 39: ...nction Address Function Name Function Read Write Control 0x02 RESET Restart device Write only Register Size Register structure Unit 0 Byte none none Description Reboot the device The communication will be lost ...

Page 40: ...Write Control 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 ...

Page 41: ...te Control 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 ...

Page 42: ...ite only Register 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 ...

Page 43: ...t Write only 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 ...

Page 44: ...tage Limits 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 Ac...

Page 45: ...l state the 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 supply 6 7 Over voltage of the power supply Other bits are reserved If any warning bit is set the LED on th...

Page 46: ...WERUP Number of boot R Register Size Register structure Unit 4 Byte Unsigned Int 32 bits none Description This register counts device power ups Each time that device initialization is done this register is incremented by one Initial value 0 Active Each time the processor is running ...

Page 47: ...e R Register Size Register structure Unit 4 Byte Unsigned Int 32 bits none Description This register counts the service time of the device in seconds Since it is saved every 2 hours to EEPROM a bias compensation of 1 hour is added at each power up Initial value 0 Active Each time the processor is running ...

Page 48: ... Address Register 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 ...

Page 49: ...d only Register 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 ...

Page 50: ...r used for 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...

Page 51: ...for a new subnet 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 su...

Page 52: ...antime If 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 ...

Page 53: ... s ASCII name 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 ...

Page 54: ...ister structure 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 ...

Page 55: ...z 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 20 Do not use a speed greater than 400kHz 24 Greater speed will not work This register cannot be saved to EEPROM and must be configured at each power up Default value 99 100kHz Examples Most common speed...

Page 56: ...unction Read 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 ...

Page 57: ... on inputs 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 ...

Page 58: ...e 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 Note This register cannot be saved to EEPROM and must be configured at each power up Example b 0000 0000 0000 0111 Ou...

Page 59: ...te of each inputs 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...

Page 60: ...2 s cplt Int 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 043V 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...

Page 61: ...Contact address FiveCo Innovative Engineering En Budron H11 CH 1052 Le Mont sur Lausanne Switzerland Tel 41 21 632 60 10 Fax 41 21 632 60 11 www fiveco ch info fiveco ch ...

Reviews: