0% found this document useful (0 votes)
54 views7 pages

Macros Com

Uploaded by

atomte41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views7 pages

Macros Com

Uploaded by

atomte41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

COMM Macro Library Page 1 of 7

COMM Macro Library

COMM Macro Library

© 2011 Schneider Electric. All rights reserved.


Safety Information

Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device before trying to
install, operate, or maintain it. The following special messages may appear throughout this documentation or
on the equipment to warn of potential hazards or to call attention to information that clarifies or simplifies a
procedure.

PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified personnel. No
responsibility is assumed by Schneider Electric for any consequences arising out of the use of this material.
A qualified person is one who has skills and knowledge related to the construction and operation of electrical
equipment and its installation, and has received safety training to recognize and avoid the hazards involved.

© 2011 Schneider Electric. All rights reserved.

About the Book

What's in this Part?


This part contains the following chapters:
l Document Scope
l Validity Note
l Disclaimer

file:///C:/Users/endri/AppData/Local/Temp/~hh3BCB.htm 31/03/2024
COMM Macro Library Page 2 of 7

© 2011 Schneider Electric. All rights reserved.

Document Scope

This is Online Help for COMM Macros in TwidoSuite.

© 2011 Schneider Electric. All rights reserved.

Validity Note

The information in this manual is applicable only for Twido programmable controllers.

© 2011 Schneider Electric. All rights reserved.

Disclaimer

The information provided in this documentation contains general descriptions and/or technical characteristics
of the performance of the products contained herein. This documentation is not intended as a substitute for
and is not to be used for determining suitability or reliability of these products for specific user applications. It is
the duty of any such user or integrator to perform the appropriate and complete risk analysis, evaluation and
testing of the products with respect to the relevant specific application or use thereof. Neither Schneider
Electric nor any of its affiliates or subsidiaries shall be responsible or liable for misuse of the information
contained herein. If you have any suggestions for improvements or amendments or have found errors in this
publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic or mechanical, including
photocopying, without express written permission of Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when installing and using this
product. For reasons of safety and to help ensure compliance with documented system data, only the
manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant instructions must be
followed.
Failure to use Schneider Electric software or approved software with our hardware products may result in
injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.

© 2011 Schneider Electric. All rights reserved.

COMM Macro Definition Functions Library

Overview
This document introduces the COMM Macro Definition Functions that you can use.

What's in this Chapter?


This chapter contains the following topics:
l C_RD1B Macro Definition Function
l C_RD1W Macro Definition Function
l C_WR1B Macro Definition Function
l C_WR1W Macro Definition Function
l C_RDNW Macro Definition Function
l C_WRNW Macro Definition Function

© 2011 Schneider Electric. All rights reserved.

file:///C:/Users/endri/AppData/Local/Temp/~hh3BCB.htm 31/03/2024
COMM Macro Library Page 3 of 7

C_RD1B Macro Definition Function


See: Related Topics Submit Feedback

Function Name
The Macro Definition Function name is C_RD1B

Description
This function allows you to read 1 bit over the Modbus network.

Associated Symbols
The following two symbols have to be created before you can use the macro. (This is done automatically by
TwidoSuite when you select the appropriate functions in the macro configuration editor):

Symbol Description

C_RD1B_ADDR This symbol has to be initialized in the ladder/list program with the first word
address to be read.

C_RD1B_VAL When the macro is executed, this symbol is updated to contain the value of the bit
read.

WARNING
UNINTENDED EQUIPMENT OPERATION
Review your program to be certain that any global memory locations that are used in the macro (%M, %MW, etc.) are
not used elsewhere in your program.
Failure to follow these instructions can result in death, serious injury, or equipment damage.

Parameter(s)
l C_RD1B parameter0
The associated parameter indicates the instance number of the macro.

Example

© 2011 Schneider Electric. All rights reserved.

C_RD1W Macro Definition Function


See: Related Topics Submit Feedback

Function Name
The Macro Definition Function name is C_RD1W

Description
This function allows you to read 1 word over the Modbus network.

Associated Symbols
The following two symbols have to be created before you can use the macro. (This is done automatically by
TwidoSuite when you select the appropriate functions in the macro configuration editor):

Symbol Description

C_RD1W_ADDR This symbol has to be initialized in the ladder/list program with the word

file:///C:/Users/endri/AppData/Local/Temp/~hh3BCB.htm 31/03/2024
COMM Macro Library Page 4 of 7

address to be read.

C_RD1W_VAL When the macro is executed, this symbol is updated to contain the value of
the word read.

Parameter(s)
l C_RD1W parameter0
This parameter indicates the instance number of the macro.

Example

© 2011 Schneider Electric. All rights reserved.

C_WR1B Macro Definition Function


See: Related Topics Submit Feedback

Function Name
The Macro Definition Function name is C_WR1B

Description
This function allows you to write 1 bit over the Modbus network.

Associated Symbols
The following symbols have to be created before you can use the macro. (This is done automatically by
TwidoSuite when you select the appropriate functions in the macro configuration editor):

Symbol Description

C_WR1B_ADDR This symbol has to be initialized in the ladder/list program with the bit
address to be written.

C_WR1B_VAL This symbol has to be initialized in the ladder/list program with the bit value
to be written.

C_WR1B_ADDRW When the macro is executed, this symbol is updated to contain the address
where the bit has been written.

C_WR1B_VALW When the macro is executed, this symbol is updated to contain the value of
the bit written.

Parameter(s)
l C_WR1B parameter0
This parameter indicates the instance number of the macro.

Example

file:///C:/Users/endri/AppData/Local/Temp/~hh3BCB.htm 31/03/2024
COMM Macro Library Page 5 of 7

© 2011 Schneider Electric. All rights reserved.

C_WR1W Macro Definition Function


See: Related Topics Submit Feedback

Function Name
The Macro Definition Function name is C_WR1W

Description
This function allows you to write 1 word over the Modbus network.

Associated Symbols
The following symbols have to be created before you can use the macro. (This is done automatically by
TwidoSuite when you select the appropriate functions in the macro configuration editor):

Symbol Description

C_WR1W_ADDR This symbol has to be initialized in the ladder/list program with the
word address to be written.

C_WR1W_VAL This symbol has to be initialized in the ladder/list program with the
word value to be written.

C_WR1W_ADDRW When the macro is executed, this symbol is updated to contain the
address where the word has been written.

C_WR1W_VALW When the macro is executed, this symbol is updated to contain the
value of the bit written.

Parameter(s)
l C_WR1W parameter0
This parameter indicates the instance number of the macro.

Example

© 2011 Schneider Electric. All rights reserved.

C_RDNW Macro Definition Function


See: Related Topics Submit Feedback

file:///C:/Users/endri/AppData/Local/Temp/~hh3BCB.htm 31/03/2024
COMM Macro Library Page 6 of 7

Function Name
The Macro Definition Function name is C_RDNW

Description
This function allows you to read N words over the Modbus network.

Associated Symbols
The following two symbols have to be created before you can use the macro. (This is done automatically by
TwidoSuite when you select the appropriate functions in the macro configuration editor):

Symbol Description

C_RDNW_ADDR1 This symbol has to be initialized in the ladder/list program with the first word
address to be read.

C_RDNW_VAL1 When the macro is executed, this symbol is updated to contain the value of the
first word read.

NOTE: If you access other symbols with an array (for example C_RDNW_VAL1[%MW0], where %MW0 is a
variable index), do not to use a word that is already used by macros.

WARNING
UNINTENDED EQUIPMENT OPERATION
Review your program to be certain that any global memory locations that are used in the macro (%M, %MW, etc.) are
not used elsewhere in your program.
Failure to follow these instructions can result in death, serious injury, or equipment damage.

Parameter(s)
C_RDNW parameter0 parameter1
l parameter0 indicates the instance number of the macro.
l parameter1 indicates the number of words to read.

Example

© 2011 Schneider Electric. All rights reserved.

C_WRNW Macro Definition Function


See: Related Topics Submit Feedback

Function Name
The Macro Definition Function name is C_WRNW

Description
This function allows you to write N words over the Modbus network.

Associated Symbols
The following two symbols have to be created before you can use the macro. (This is done automatically by
TwidoSuite when you select the appropriate functions in the macro configuration editor):

Symbol Description

C_WRNW_ADDR1 This symbol has to be initialized in the ladder/list program with the first word
address to be written.

file:///C:/Users/endri/AppData/Local/Temp/~hh3BCB.htm 31/03/2024
COMM Macro Library Page 7 of 7

C_WRNW_VAL1 When the macro is executed, this symbol is updated to contain the value of the
first word written.

NOTE: All words must have a value in order for this macro to work. Fill in arrays carefully, do not to use a word
that has already been used by a macro.

WARNING
UNINTENDED EQUIPMENT OPERATION
Review your program to be certain that any global memory locations that are used in the macro (%M, %MW, etc.) are
not used elsewhere in your program.
Failure to follow these instructions can result in death, serious injury, or equipment damage.

Parameter(s)
C_WRNW parameter0 parameter1
l parameter0 indicates the instance number of the macro.
l parameter1 indicates the number of words to write.

Example

© 2011 Schneider Electric. All rights reserved.

file:///C:/Users/endri/AppData/Local/Temp/~hh3BCB.htm 31/03/2024

You might also like