Campbell Hausfeld SDM-SIO4 manual Parity Bits, Serial Handshake Modes

Page 72

SDM-SIO4 4-Channel Serial I/O Interface

B.4 Parity Bits

Parity can be enabled and set to either odd or even.

0.No parity set

1.Odd parity set

2.Even parity set

B.5 Serial Handshake Modes

You can select different kinds of handshaking from none at all, hardware (DTR, CTS etc.) and XON/XOFF. On modes 0 and 1 there is a user-set delay (0..254 x 50ms) between CTS being set and data being sent; this allows time for sensors to power up.

0.Leave as previously set.

1.DTR is always set as the SDM-SIO4 is always ready for data. RTS is set when data is ready to transmit. Data is transmitted following a delay (n x 50ms) after CTS is set; transmission stops if CTS falls.

2.DTR and RTS are always set. Data is transmitted following a delay (n x 50ms) after CTS is set; transmission stops if CTS falls.

3.DTR and RTS are always set; ignore CTS.

4.XON/XOFF software handshake. The SDM-SIO4 will XON again if no more XOFFs are sent after a time-out of n x 50ms. This mode is only functional for data transmissions from the SDM-SIO4. If an RS232 device sends large amounts of data and it can only be controlled by XON/XOFF techniques it must be implemented from within the datalogger program (by using datalogger instructions to send the stop and start characters).

9.No automatic handshaking. The datalogger can read, set or clear RTS and DTR under datalogger program control; this is effectively ‘manual’ handshake control.

Delay – this is the delay referred to above. It is entered in 50ms steps. Values in the range 0..254 are acceptable. The accuracy is -50ms, +0ms.With XOFF/XON, 255 is a special case as indicated below.

NOTE If the delay is set to 255, then the SDM-SIO4 will stay in the

XOFF state indefinitely, until an XON is received.

B-2

Image 72
Contents Issued Page Guarantee Page Contents Data Error Detection Appendix A. Ascii TableWhat is the SDM-SIO4? IntroductionDatalogger Command Control Specifications SDM-SIO4 Serial Port Pin ConfigurationSerial Ports Serial Port BuffersPower Requirements SDM PortCase Environmental Operating RangeOther Key Features Page Installation and Hardware Set-Up Setting the SDM AddressAddress Settings Selector Block Settings SDM AddressSelecting RS232 or 5V Logic for Each Port Connections to the SDM-SIO4Transient Protection and Grounding Power-on Tests the Status LED Status LED Error CodesNo. of Flashes Description of error/status Page Understanding How the SDM-SIO4 Handles Data IntroductionMethod of Entering Special / Control Characters Input Filters Filter TypesSimple Filters Filter Strings Ibn8Ficn8F Output Formatting Simple Output FormatterPredefined Filter Strings Filter No Filter String UsedOutput Format Strings Fmtst 123 z261 f62 iBattery z257 f61z273 CR10X Program ExampleGet battery voltage Get panel temperatureCommand Line Operation and Structure Entering CommandsProgramming the SDM-SIO4 Basic Commands Advanced Commands Errorres Hexdump start address number of bytesBytewr address byte WD n Wderr n Wdaddr nTestio test# Testio returnsPage Programming the Datalogger Instruction 113 ParametersCommands and Options Parameters 4, 5 Parameter 7 Values per RepParameter 8 Starting Input Location Parameters 9 and 10 Multiplier and OffsetCommand 1 Poll of Available Data Understanding Parameter Options and Returned ValuesCommand 2 Signatures Command 3 Flush all Receive BuffersCommand 4 Send Data to Datalogger Command 5 StatusCommand 6 Flush Transmit Buffer Command 7 Activate Command LineCommand 8 Poll Tx Buffers for Data Command 9 Flush Converted Data BufferCommand 67 Get Return Code Command 320 Send Byte Data to SDM-SIO4Command 321 Execute Command Line Command Program Example for P113 CommandExecute the command line string Command 1024 Send String to Device Command 1025 Transmit a ByteCommand 1026 Serial Port Status First Value ReturnedFirst Command Option Reset Error Counters Second Value ReturnedThird 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 SDM-SIO4 Configuration Examples Command 2305 Transmit BytesExample CR10X Program End of serial and filter setup Set flag one high so the above will only be done onceGet two floating point numbers into locations 1 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 dataSensors Which Send Data Out Without Prompting Get data from SDM-SIO4 and put into locations 1Time stamp Instantaneous sample form the sensorExample CR10X Program without Polling or Interrupts Fltst 200 tdataA5xffExample CR10X Program using the Polling Method End of set upGet the two floating point values from the SDM-SIO4 Instantaneous values stored to final storageSet up string filter Delay required by filter set-up commandDo filter set-up only if flag one is clear Set flag one high so the filter set-up is only done onceExample CR10X Program using Interrupts Get voltages into locations 3 and 4 if poll was trueInstantaneous value stored into final storage Do filter setup only if flag one is clear Delay required by filter setup commandSet control port 8 to i/p so it can be used as an interrupt Interrupt routine for control port Get voltages into locations 3Instantaneous readings stored into final storage End of interrupt routineOutputting Datalogger Data Return Error Codes Flushing the Input and Output BuffersData Error Detection Error Detection with the SDM-SIO4Received Data SDM-SIO4 User Guide Example of Using Received Data Filters 2 CR10X Program ExampleFltst 100 TFrequency=xg2n10fCCG8 Minimum delay of 4ms is required by the above P113 End of filter setupTell the SDM-SIO4 to use filter string 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 G8Use formatter string 100 to set up the CRC16 on port Minimum delay of 1ms is required after this commandMinimum delay of 3.8ms 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 Appendix B. Serial Port Data Transfer Modes Baud ratesStop Bits Data LengthParity Bits Serial Handshake Modes