Topic: DMD0297 DLWX - DirectLOGIC Network Write |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The DirectLOGIC Network Write (DLWX) instruction uses the onboard Ethernet port or an ECOM module to write data to a remote DirectLOGIC PLC through an ECOM module in the remote system.
The DirectLOGIC Network Write instruction will use TCP/IP broadcasts
to perform the network write operation, this means that both the Do-more controller and the remote ECOM
module must be in the same broadcast
domain
|
| |||||||||||||||||||||||||
Element References:Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.
Network Device
- designates which of the configured Devices to use. Before this instruction
can select a Device, that Device must be configured to accept data from
an external source. Part of the configuration for a device is assigning
a name to the device. It is that name which will show up in the Device
selection drop-down menu. For more information on configuring devices
go to the Device
Configuration Section under System Configuration.
Remote Address - specifies which of the following addressing modes to use:
From - designates the beginning address of the data to send to the remote slave. This value must be compatible with the type specified in the To DL selection:
If V-memory is selected the From value must be from a WORD or DWORD range. This value can be any writable numeric location.
If one of the BIT types is selected the From
value must be from a BIT range. This value can be any writable
numeric location. Note: in most cases, the built-in DirectLOGIC memory blocks DLX / DLY / DLC / DLV should NOT be used as the source location for data sent by the DLX instruction because these memory locations are reserved for use by the Do-more's DirectLOGIC Server (Slave) function. Refer to the DirectLOGIC Memory Blocks diagram in the Memory Configuration section of the System Configuration for more information.
Number of Bytes - designates the number of elements of the selected type to write.
To DL - designates the data type and the address to write to in the DL controller.
Enable - designates how this instruction will operate.
Select from one of the following:
On Success - designates one of the following two options if the DirectLOGIC Network Write operation is successful:
On Error - designates one of the following two options if the DirectLOGIC Network Write operation is unsuccessful:
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Status Display:The red triangle in the upper left corner of the status display indicates this is a Fully Asynchronous instruction.
|
| |||||||||||||||||||||||||
|
||||||||||||||||||||||||||
See Also:
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Example 1 of 2: |
||||||||||||||||||||||||||
Description of a Typical DirectLOGIC Network Write (DLWX) Stage Diagram:
Initially the NewRec (New Recipe) stage monitors a bit from the slave. When this bit comes ON, RecipeRdy (Recipe Ready) causes the transition to the RDRec stage.
The RDRec (Read Recipe) reads the new recipe from the slave. When this completes, RecipeRD (Recipe Read) causes the transition to the RSTRec stage.
The RSTRec (Reset Recipe) writes a bit to the slave to inform it the recipe has been read successfully. When this write is complete, RecipeRST (Recipe Reset) causes a transition to the RSTMon stage.
The RSTMon (Reset Monitor) stage monitors a bit from the slave to confirm the slave heard the reset. When this bit comes ON, MonRST (Monitor Reset) causes a transition back to the NewRec stage to repeat the process and wait for the next new recipe. |
||||||||||||||||||||||||||
Description of a Typical DirectLOGIC Network Write (DLWX) Stage Ladder:
A summary of the master/slave interaction is as follows:
NewRecipe is the initial stage. The DLRX instruction is set to execute "Continuous at Interval 0.100s" to read a bank of C-bits (C10-27) from the DL-PLC. This word contains the bit the DL-PLC will turn ON when a new recipe has been stored and is ready for the Do-more PLC to read it up. C10 will be stored in Monitor's first bit (Monitor:0), C11 in Monitor's second bit (Monitor:1), etc, until 16 bit are stored. The DLRX reads this bank of bits and stores it in the Monitor word. Upon the successful completion of each read the ReadSuccess1 bit will come ON. When there has been a successful read and the Monitor:0 bit is ON, Rung 3 resets the Monitor:0 bit back OFF (in preparation for the next cycle) and transitions to the ReadRecipe stage. If any one of these reads fails, the DLRX instruction will transition to the ErrorStage where the error can be handled.
The ReadRecipe stage executes the DLRX instruction once to read up the new recipe from DL-PLC's V2000-2017 memory range and stores them in Do-more memory range RecipeVar01-RecipeVar16. Upon a successful read, the DLRX transitions to the ResetRecipe stage. If the read failed, the DLRX instruction will transition to the ErrorStage.
The ResetRecipe stage executes the DLWX instruction once to write the Monitor word (16 bits) down to the bank of C-bits (C10-27) to inform the DL-PLC the new recipe has been read up successfully (i.e. C10 will be written OFF). Upon a successful read, the DLWX transitions to the ResetMonitor stage. If the write failed, the DLWX instruction will transition to the ErrorStage.
The ResetMonitor stage monitors a feedback bit (C11) from the DL-PLC that the DL-PLC should use to inform the Do-more PLC that it "heard" the recipe read was successful and that the DL-PLC can now make preparations for the next recipe. The DLRX reads this bit (C11) by reading the same bank of bits (C10-27) and storing them in Monitor word. Upon the successful completion of each read the ReadSuccess2 bit will come ON. When there has been a successful read and the Monitor:1 bit (i.e. C11) is ON, Rung 10 resets the ReadSuccess2 bit back OFF (in preparation for the next cycle) and transitions back to the initial NextRecipe stage. If any one of these reads fails, the DLRX instruction will transition to the ErrorStage.
The ErrorStage should have code in it (not shown here) that evaluates the various errors that can occur in this example. |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Example 2 of 2: |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|