Рук_п_Имп-4 (1031891), страница 9
Текст из файла (страница 9)
(See Appendix B)ff is a hexadecimal number that equals the 8-bit parameter representing data format. Bits 0 and 1 represent dataformat. Bit 7 represents integration time. The layout ofthe 8-bit parameter is shown in Figure 6-3. The other bitsare not used and are set to 0.(cr) is the terminating character, carriage return (0Dh)% $ # " ! Not usedData Format00: Engineering unitsIntegration Time0: 50 ms (Operation under 60 Hz power)1: 60 ms (Operation under 50 Hz power)Figure 6-3 Data format for 8-bit parameters6-38ADAM-5000Chapter 6$aaSiArrffResponse$aaSiArrff!aa(cr) if the command is valid.?aa(cr) if an invalid operation was entered.There is no response if the module detects a syntax erroror communication error or if the specified address doesnot exist.! delimiter character indicating a valid command wasreceived.? delimiter character indicating the command wasinvalid.aa (range 00-FF) represents the 2-character hexadecimaladdress of an ADAM-5000 system.(cr) is the terminating character, carriage return (0Dh)Examplecommand: $35S3A0000(cr)response: !35(cr)The analog input module in slot 3 of the ADAM-5000system at address 35h is configured to an input range±15mV, engineering units data format, and integrationtime 50ms (60Hz).The response indicates that the command has beenreceived.Note:ADAM-5000An analog input module requires a maximum of 7seconds to perform auto calibration and ranging afterit is reconfigured.
During this time span, the modulecannot be addressed to perform any other actions.6-39Command Set5017/5018 Analog Input$aaSiBName$aaSiBConfiguration StatusDescription Returns the configuration status parameters for aspecified analog input module of a specified system.Syntax$aaSiB(cr)$ is a delimiter character.aa (range 00-FF) represents the 2-character hexadecimaladdress of the ADAM-5000 system you want tointerrogate.Si identifies the I/O slot you want to read.B is configuration status command.(cr) is the terminating character, carriage return (0Dh)Response!aarrff(cr) if the command is valid.?aa(cr) if an invalid operation was entered.There is no response if the module detects a syntax erroror communication error or if the specified address doesnot exist.! delimiter character indicating a valid command wasreceived.? delimiter character indicating the command wasinvalid.aa (range 00-FF) represents the 2-character hexadecimaladdress of an ADAM-5000 system.rr represents the 2-character hexadecimal code of theinput range.ff is a hexadecimal number that equals the 8-bit parameter representing data format.
Bit 0 and 1 represent dataformat. Bit 7 represents integration time. (See Configuration Command $aaSiArrff).6-40ADAM-5000Chapter 6$aaSiB$aaSiB(cr) is the terminating character, carriage return (0Dh)Examplecommand: $26S1Bresponse: !260000The ADAM-5018 analog input module in slot 1 of theADAM-5000 system at address 26h responds with aninput range ±15mV, engineering units data format, andintegration time 50ms (60Hz).ADAM-50006-41Command Set5017/5018 Analog Input$aaSi5mmName$aaSi5mmEnable/Disable Channels for multiplexingDescription Enables/Disables multiplexing for separate channels ofthe specified input moduleSyntax$aaSi5mm(cr)$ is a delimiter character.aa (range 00-FF) represents the 2-character hexadecimaladdress of the ADAM-5000 system.Si identifies the I/O slot of the system.5 identifies the enable/disable channels command.mm are two hexadecimal values.
Each value is interpreted as 4 bits. The first 4-bit value represents the status ofchannels 4-7, the second 4 bit value represents thestatus of channels 0-3. A value of 0 means the channelis disabled, while a value of 1 means the channel isenabled. (See the Read Channel Status Command$aaSi6)Note:Bit 7 cannot be enabled in the ADAM-5018 since themodule is physically limited to 7 channels.(cr) is the terminating character, carriage return (0Dh)Response!aa(cr) if the command is valid.?aa(cr) if an invalid operation was entered.There is no response if the module detects a syntax erroror communication error or if the specified address doesnot exist.! delimiter character indicating a valid command wasreceived.? delimiter character indicating the command wasinvalid.6-42ADAM-5000Chapter 6$aaSi5mm$aaSi5mmaa (range 00-FF) represents the 2-character hexadecimaladdress of an ADAM-5000 system.(cr) is the terminating character, carriage return (0Dh)Examplecommand: $00S1581(cr)response: !00(cr)The command enables/disables channels of the analoginput module in slot 1 of the system at address 00h.Hexadecimal 8 equals binary 1000, which enableschannel 7 and disables channels 4, 5 and 6.
Hexadecimal1 equals binary 0001, which enables channel 0 anddisables channels 1, 2 and 3.ADAM-50006-43Command Set5017/5018 Analog Input$aaSi6Name$aaSi6Read Channels StatusDescription Asks a specified input module to return the status of allchannelsSyntax$aaSi6(cr)$ is a delimiter character.aa (range 00-FF) represents the 2-character hexadecimaladdress of the ADAM-5000 system you want tointerrogate.Si identifies the I/O slot of the system you want to readchannels status.
The channel status defines whether achannel is enabled or disabled.6 is the read channels status command.(cr) is the terminating character, carriage return (0Dh)Response!aamm(cr) if the command is valid.?aa(cr) if an invalid operation was entered.There is no response if the module detects a syntax erroror communication error or if the specified address doesnot exist.! delimiter character indicating a valid command wasreceived.? delimiter character indicating the command wasinvalid.aa (range 00-FF) represents the 2-character hexadecimaladdress of an ADAM-5000 system.mm are two hexadecimal values.
Each value is interpreted as 4 bits. The first 4-bit value represents the status ofchannels 4-7, the second 4 bits represents the status of6-44ADAM-5000Chapter 6$aaSi6$aaSi6channels 0-3. A value of 0 means the channel isdisabled, while a value of 1 means the channel isenabled.(cr) is the terminating character, carriage return (0Dh)Examplecommand: $02S16(cr)response: !02FF(cr)The command asks the analog input module in slot 1 ofthe system at address 02h to send the status of its inputchannels. The analog input module responds that all itsmultiplex channels are enable (FF equals 1111 and 1111).ADAM-50006-45Command Set5017/5018 Analog Input#aaSiName#aaSiAll Analog Data InDescription Returns the input value of all channels for a specifiedanalog input module of a specified system in engineering unit only.Syntax#aaSi(cr)# is a delimiter character.aa (range 00-FF) represents the 2-character hexadecimaladdress of the ADAM-5000 system you want tointerrogate.Si is the I/O slot of ADAM-5000 system you want toread.(cr) is the terminating character, carriage return (0Dh)Response>(data) (data) (data) (data) (data) (data) (data) (data) (cr) ifthe command is valid.?aa(cr) if an invalid operation was entered.There is no response if the module detects a syntax erroror communication error or if the specified address doesnot exist.> is a delimiter character indicating a valid command wasreceived.? delimiter character indicating the command wasinvalid.(data) is the input value in engineering units of a channelin the interrogated module of the specified system.
The(data) from all channels is shown in sequence from 7 to0. If (data) = “ ”, it means the channel is invalid.(cr) is the terminating character, carriage return (0Dh)6-46ADAM-5000Chapter 6#aaSiExample#aaSicommand: #12S1(cr)response: +1.4567 +1.4852 +1.4675 +1.4325 +1.4889+1.4235 +1.4787 +1.4625(cr)The command requests the analog input module in slot 1of the ADAM-5000 system at address 12h to return theinput values of all channels.The analog input module responds that input values ofall channels are in sequence from 7 to 0: +1.4567,+1.4852, +1.4675, +1.4325, +1.4889, +1.4235, +1.4787 and+1.4625.ADAM-50006-47Command Set5017/5018 Analog Input#aaSiCjName#aaSiCjSpecified Analog Data InDescription Returns the input value of a specified channels for aspecified analog input module of a specified system inengineering unit only.Syntax#aaSiCj(cr)# is a delimiter character.aa (range 00-FF) represents the 2-character hexadecimaladdress of the ADAM-5000 system you want tointerrogate.Si identifies the I/O slot you want to interrogate.Cj identifies the channel you want to read.(cr) is the terminating character, carriage return (0Dh)Response>(data) if the command is valid.?aa(cr) if an invalid operation was entered.There is no response if the module detects a syntax erroror communication error or if the specified address doesnot exist.> is a delimiter character indicating a valid command wasreceived.? delimiter character indicating the command wasinvalid.(data) is the input value in engineering units of thespecified channel for a specified analog input module ofthe specified system.
If (data) = “ ”, it means thechannel is invalid.(cr) is the terminating character, carriage return (0Dh)6-48ADAM-5000Chapter 6#aaSiCjExample#aaSiCjcommand: #22S2C2(cr)response: >+1.4567The command requests the analog input module in slot 2of the ADAM-5000 system at address 22h to return theinput value of channel 2.The analog input module responds that the input valueof channel 2 is +1.4567.ADAM-50006-49Command Set5017/5018 Analog Input$aaSiERName$aaSiERInitialize EEPROM dataDescription Initializes all EEPROM data in a specified analog inputmodule to their default values.















