0% found this document useful (0 votes)
2 views

NEG (Create twos complement)

The document provides instructions for the NEG (Create twos complement) function in the S7-1200 Programmable Controller. It details the proper use, safety warnings, and the data types for input and output parameters. Additionally, it includes legal information, trademarks, and a disclaimer of liability from Siemens Aktiengesellschaft.

Uploaded by

Uhule Peter
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)
2 views

NEG (Create twos complement)

The document provides instructions for the NEG (Create twos complement) function in the S7-1200 Programmable Controller. It details the proper use, safety warnings, and the data types for input and output parameters. Additionally, it includes legal information, trademarks, and a disclaimer of liability from Siemens Aktiengesellschaft.

Uploaded by

Uhule Peter
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/ 6

NEG (Create twos complement)

S7-1200 Programmable controller

V20

11/2024
Legal information
Warning notice system

This manual contains notices you have to observe in order to ensure your personal safety, as
well as to prevent damage to property. The notices referring to your personal safety are
highlighted in the manual by a safety alert symbol, notices referring only to property damage
have no safety alert symbol. These notices shown below are graded according to the degree of
danger.

DANGER

indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING

indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION

indicates that minor personal injury can result if proper precautions are not taken.

NOTICE

indicates that property damage can result if proper precautions are not taken.

If more than one degree of danger is present, the warning notice representing the highest
degree of danger will be used. A notice warning of injury to persons with a safety alert symbol
may also include a warning relating to property damage.

Qualified Personnel

The product/system described in this documentation may be operated only by personnel


qualified for the specific task in accordance with the relevant documentation, in particular its
warning notices and safety instructions. Qualified personnel are those who, based on their
training and experience, are capable of identifying risks and avoiding potential hazards when
working with these products/systems.

Proper use of Siemens products

Note the following:

WARNING

Siemens products may only be used for the applications described in the catalog and in the
relevant technical documentation. If products and components from other manufacturers are
used, these must be recommended or approved by Siemens. Proper transport, storage,
installation, assembly, commissioning, operation and maintenance are required to ensure
that the products operate safely and without any problems. The permissible ambient

2 , 11/2024
conditions must be complied with. The information in the relevant documentation must be
observed.

Trademarks

All names identified by ® are registered trademarks of Siemens Aktiengesellschaft. The


remaining trademarks in this publication may be trademarks whose use by third parties for their
own purposes could violate the rights of the owner.

Disclaimer of Liability

We have reviewed the contents of this publication to ensure consistency with the hardware and
software described. Since variance cannot be precluded entirely, we cannot guarantee full
consistency. However, the information in this publication is reviewed regularly and any
necessary corrections are included in subsequent editions.

Siemens Aktiengesellschaft
Copyright © Siemens 2024.
Digital Industries
11/2024 Subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY

, 11/2024 3
Table of content

1 NEG (Create twos complement) 6

4 , 11/2024
, 11/2024 5
NEG (Create twos complement)
Table 1. NEG (create twos complement) instruction
1
LAD / SCL Description
FBD

- The NEG instruction inverts the arithmetic sign of the value at parameter IN
(in); and stores the result in parameter OUT.

1 For LAD and FBD: Click the "???" and select a data type from the drop-down menu.

Table 2. Data types for parameters

Parameter Data type1 Description

IN SInt, Int, DInt, Real, LReal, Constant Math operation input

OUT SInt, Int, DInt, Real, LReal Math operation output

1 The IN and OUT parameters must be the same data type.

Table 3. ENO status

ENO Description

1 No error

0 The resulting value is outside the valid number range of the selected data type.
Example for SInt: NEG (-128) results in +128 which exceeds the data type maximum.

6 , 11/2024

You might also like