BASEstartm Classic DAS
for Modicon®
Programmable Controllers
Installation and User's Guide


Previous Contents Index

3.3.3 Read and Write Data Functions

Use the BASEstar Classic device connection management read data and write data functions to read data from and write data to a specific address in device storage. Address syntax is specific to each device or device family, and is similar to the syntax used with the Modicon terminals. The supported data types depend on the device.

Example 3-1 shows an example of the information displayed when you enter the READ DATA command.

Example 3-1 Read Data Screen

 
DCM> read data mod_584/addr=00001/form=bit 
 
Device      : MOD_584 
Data starting at address 00001 for BIT  element. 
Data: 
    0:      1 
 
DCM> read data mod_584/addr=00001/form=array[64]:bit 
 
Device      : MOD_584 
Data starting at address 00001 for ARRAY[64]:BIT  element. 
Data: 
    0:   1   1   0   0   0   0   0   0   0   0   0   0   0   0   0   0 
   16:   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0 
   32:   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0 
   48:   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0 
 

Example 3-2 provides an example of the information displayed when you enter the READ DATA command using structured data.

Example 3-2 Read Data Screen with Structured Data

 
DCM> cre phyp p1/dev=mod_584_1/addr=00001/form="struct" - 
DCM> (word,word,array[10]:word)"/write 
DCM> read phyp p1/dev=mod_584_1 
 
Point       : P1 
Device      : MOD_584_1 
Address     : 40100 
Format      : STRUCTURE(S_WORD,S_WORD,ARRAY[10]:S_WORD) 
 
Data: 
    0       :        26 
    1.0     :        29       29       29       29       29       29 
    1.7     :        29       29       29 
 

Example 3-3 shows an example of the information displayed when you enter the WRITE DATA command.

Example 3-3 Write Data Screen

 
DCM> write data mod_584/addr=40200/format=word 
 
Device      : MOD_584 
Data starting at address 40200 for S_WORD element 
 
 
Data value           0 : 100 
 

Example 3-4 shows an example of the information displayed when you enter the WRITE DATA command using structured data.

Example 3-4 Write Data Screen with Structured Data

 
DCM> write phyp p2/dev=mod_584_1 
 
Point       : P2 
Device      : MOD_584_1 
Address     : 00001 
Format      : STRUCTURE(BIT,BIT,ARRAY[8]:BIT) 
 
Data value     0       :        1 
Data value     1       :        0 
Data value     2.0     :        1 
Data value     2.1     :        1 
Data value     2.2     :        1 
Data value     2.3     :        0 
Data value     2.4     :        0 
Data value     2.5     :        0 
Data value     2.6     :        0 
Data value     2.7     :        1 
 

The following sections describe the use of the read data and write data functions by specific Modicon devices, including addressing and data type formats. The supported data type formats are bit, word, unsigned word, and longword.

3.3.3.1 Quantum, Modicon 984 and Modicon 584

Addressing and data type formats are necessary for performing the read data and write data functions for the Modicon 584, 984 and Quantum devices.

Addressing

The valid addressing types for the Modicon 584, 984 and Quantum are:


00001 - 0xxxx          Coils 
10001 - 1xxxx          Discrete inputs 
30001 - 3xxxx          Input registers 
40001 - 4xxxx          Holding registers 

Note

For the Modicon 984 and Quantum, the maximum holding and input register is 65535. For the Modicon 584, the maximum holding and input register is 9999.

For controllers that have the extended file capability, the format is as follows:


60000:1 - 6xxxx:y      xxxx is the highest register number within a file 
                       y    is the file number      

Note

You cannot write to discrete inputs or input registers.

Data Type Formats

The valid data type formats for the Modicon 584, 984 and Quantum are:


00001 - 0xxxxx          Bit, Word or U_word 
10001 - 1xxxxx          Bit, Word or U_word 
30001 - 3xxxxx          Bit, Word or U_word 
40001 - 4xxxxx          Bit, Word, U_word, Long, U_long or Float 
60001:1 - 6xxxxx:y      Bit, Word or U_word 

Note

When writing bits to word based registers, a multiple of 16 bits must be written.


Previous Next Contents Index