Example and State Diagram Here is an example of a request to remote device to Return Query Data. This uses a sub-function code of zero (00 00 hex in the two-byte field). The data to be returned is sent in the two-byte data field (A5 37 hex).The data fields in responses to other kinds of queries could contain error counts or other data requested by the sub-function code.
The normal response will be an echo of the Slave address, function code, starting address, and quantity of coils forced.The writing of coils via Modbus function 15 will be accomplished regardless of whether the addressed coils are disabled or not. Coils that are unprogrammed in the controller logic program are not automatically cleared upon power up. Thus, if such a coil is set ON by function code 15 and (even months later) an output is connected to that coil, the output will be hot.
Force Multiple Coils (Function Code 15)
Query This message forces each coil in a consecutive block of coils to a desired ON or OFF state. Any coil that exists within the controller can be forced to either state (ON or OFF). However, because the controller is actively scanning, unless the coils are disabled, the controller can also alter the state of the coil. Coils are numbered from zero (coil 00001 = zero, coil 00002 = one, and so on). The desired status of each coil is packed in the data field, one bit for each coil (1= ON, 0= OFF). The use of Slave address 0 (Broadcast Mode) will force all attached Slaves to modify the desired coils. Note: Functions 5, 6, 15, and 16 are the only messages (other than Loopback Diagnostic Test) that will be recognized as valid for broadcast.
Preset Multiple Registers (Function Code 16)
Query Holding registers existing within the controller can have their contents changed by this message (a maximum of 60 registers). However, because the controller is actively scanning, it also can alter the content of any holding register at any time. The values are provided in binary up to the maximum capacity of the controller (16-bit for the 184/384 and 584); unused high order bits must be set to zero. Note: Function codes 5, 6, 15, and 16 are the only messages that will be recognized as valid for broadcastResponse The normal response to a function 16 query is to echo the address, function code, starting address and number of registers to be loaded.
1.Payment method and delivery
Shipment: EMS,DHL,UPS & FEDEX
Payment: T/T or Western Union
2. About us
We are professional company and we are expert in this business, we have highly experienced production team, or sales team, or purchase team, we have most advanced production line. We are reputable in the market.
3. Application industry
Our main products are widely used in metallurgy, oil and gas, glass manufacturing, aluminum, petrochemical, coal mine, paper making and printing, textile printing and dyeing, machinery, electronic manufacturing, automobile manufacturing, tobacco, plastic machinery, electricity, water conservancy, water treatment/environmental protection, municipal engineering, boiler heating, energy, power transmission and distribution, etc.