Campbell Hausfeld manual Selecting RS232 or 5V Logic for Each Port, Connections to the SDM-SIO4

Page 14

SDM-SIO4 User Guide

2.2 Selecting RS232 or 5V Logic for Each Port

The output voltage levels of each serial port can be set to either:

Logic level output: +5V (high) / 0V (low) or

∙ RS232 output:

+5V (high) / -5V (low) (compatible with RS232 driver

 

requirements).

The logic level output is used when driving a logic level compatible device, e.g. an SC32A, or where quiescent current is a concern. This mode is lower power because the idle state is 0V, while the idle state of the RS232 output is -5V which results in current flow to ground via the input resistance of the RS232 device’s inputs. However, in practice, this logic level output mode can be used with the majority of RS232 sensors as most accept a logic level drive signal as a valid input signal.

The output levels are configured via a 4 x 3-way block of jumpers at the back of the unit. There is one jumper for each port. Text is printed on the circuit board to indicate the port and the relevant position for the two modes. If the jumper is fitted on (shorts) the two pins close to the right hand side of the unit, the port will be in RS232 mode and if the two pins close to the left hand side are shorted, the port is set to 5V logic.

The inputs to the SDM-SIO4 are compatible with either logic level or RS232 signals.

2.3 Connections to the SDM-SIO4

Connect the SDM port to the datalogger SDM terminals as described under ‘SDM Port’ in Section 1. Use a short, low-capacitance, screened cable. The 12V supply can normally be taken from the 12V supply input to the datalogger.

Make up cables for the RS232 devices to match the connections shown under ‘SDM-SIO4 Port’ in Table 1 (Section 1). Please refer to your sensor manual for a description of the required connections, including the handshaking requirements. To minimise susceptibility to noise, use screened connectors and cables.

2.3.1 Transient Protection and Grounding

The G terminal on the SDM-SIO4 acts both as a ground reference point for digital communications via the SDM port and also as a protective ground for the SDM-SIO4. Usually it can be connected back to the datalogger power ground (G on a CR10/10X). This ground in turn should be connected to the safety ground for the whole system.

The SDM-SIO4 has protection against electrostatic discharge and induced transients on all input and output lines. However, the level of protection offered is limited by the grounding paths within the case. Where long cables are to be run to remote serial devices, especially in areas prone to lightning, external lightning protection is recommended on all lines connected to the serial ports (contact Campbell Scientific for further details).

The possibility of ground loops being set up between the datalogger and the remote RS232 device via the serial cable should also be considered. Ground loops formed by secondary return earth paths can lead to various problems including:

2-2

Image 14
Contents Issued Page Guarantee Page Contents Data Error Detection Appendix A. Ascii TableWhat is the SDM-SIO4? IntroductionDatalogger Command Control Serial Ports SpecificationsSDM-SIO4 Serial Port Pin Configuration Serial Port BuffersCase Power RequirementsSDM Port Environmental Operating RangeOther Key Features Page Address Settings Installation and Hardware Set-UpSetting the SDM Address Selector Block Settings SDM AddressTransient Protection and Grounding Selecting RS232 or 5V Logic for Each PortConnections to the SDM-SIO4 No. of Flashes Description of error/status Power-on Tests the Status LEDStatus LED Error Codes Page Method of Entering Special / Control Characters Understanding How the SDM-SIO4 Handles DataIntroduction Simple Filters Input FiltersFilter Types Filter Strings Ibn8Ficn8F Predefined Filter Strings Output FormattingSimple Output Formatter Filter No Filter String UsedOutput Format Strings Fmtst 123 z261 f62 iBattery z257 f61z273 CR10X Program ExampleGet battery voltage Get panel temperatureProgramming the SDM-SIO4 Command Line Operation and StructureEntering Commands Basic Commands Advanced Commands Bytewr address byte ErrorresHexdump start address number of bytes WD n Wderr n Wdaddr nTestio test# Testio returnsPage Programming the Datalogger Instruction 113 ParametersParameter 8 Starting Input Location Commands and Options Parameters 4, 5Parameter 7 Values per Rep Parameters 9 and 10 Multiplier and OffsetCommand 1 Poll of Available Data Understanding Parameter Options and Returned ValuesCommand 4 Send Data to Datalogger Command 2 SignaturesCommand 3 Flush all Receive Buffers Command 5 StatusCommand 8 Poll Tx Buffers for Data Command 6 Flush Transmit BufferCommand 7 Activate Command Line Command 9 Flush Converted Data BufferCommand 321 Execute Command Line Command Command 67 Get Return CodeCommand 320 Send Byte Data to SDM-SIO4 Program Example for P113 CommandExecute the command line string Command 1026 Serial Port Status Command 1024 Send String to DeviceCommand 1025 Transmit a Byte First Value ReturnedThird Value Returned First Command Option Reset Error CountersSecond Value Returned Fourth Value ReturnedCommand 1027 ‘Manual’ Handshake Mode Command 2049 Set Communications ParametersFirst Command Option Parameter Second Command Option ParameterCommand 2054 Set Up Receive Filter String Number or Character Code Example CR10X Program SDM-SIO4 Configuration ExamplesCommand 2305 Transmit Bytes Get two floating point numbers into locations 1 End of serial and filter setupSet flag one high so the above will only be done once Example CR10X Program Using Instruction P113 Command Strst 101 Send DataJMSet up the filter and then send string Wait long enough for sensor to send dataTime stamp Sensors Which Send Data Out Without PromptingGet data from SDM-SIO4 and put into locations 1 Instantaneous sample form the sensorExample CR10X Program without Polling or Interrupts Fltst 200 tdataA5xffGet the two floating point values from the SDM-SIO4 Example CR10X Program using the Polling MethodEnd of set up Instantaneous values stored to final storageDo filter set-up only if flag one is clear Set up string filterDelay required by filter set-up command Set flag one high so the filter set-up is only done onceInstantaneous value stored into final storage Example CR10X Program using InterruptsGet voltages into locations 3 and 4 if poll was true Set control port 8 to i/p so it can be used as an interrupt Do filter setup only if flag one is clearDelay required by filter setup command Instantaneous readings stored into final storage Interrupt routine for control portGet voltages into locations 3 End of interrupt routineOutputting Datalogger Data Return Error Codes Flushing the Input and Output BuffersReceived Data Data Error DetectionError Detection with the SDM-SIO4 SDM-SIO4 User Guide Fltst 100 TFrequency=xg2n10fCCG8 Example of Using Received Data Filters2 CR10X Program Example Tell the SDM-SIO4 to use filter string Minimum delay of 4ms is required by the above P113End of filter setup End of get data Transmitted Data CRC32Example of Using Transmitted Data Filters Fmtst 100 g1i123456789G8Alternative CR10X Program Fmtst 100 g1 Fmtst 101 isome data Fmtst 102 f62 G8Minimum delay of 3.8ms is required after this command Use formatter string 100 to set up the CRC16 on portMinimum delay of 1ms is required after this command Send the Ascii characters ‘Y’ and ‘Z’ to portCRC16-CCITT-IBM Data Error Detection Page Appendix A. Ascii Table Dec CharPage Stop Bits Appendix B. Serial Port Data Transfer ModesBaud rates Data LengthParity Bits Serial Handshake Modes