02.09.2014 Views

ISPSoft User Manual

ISPSoft User Manual

ISPSoft User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 11 Structured Text<br />

Example 6: Examples of incorrect use of the assignment structure are as follows.<br />

Statement<br />

Description<br />

The data type of one operand must not be different from the<br />

D0 := M0 ;<br />

data type of the other operand.<br />

The data length of the operand at the left side of := must not<br />

V_WORD := V_DWORD ; be less than the data length of the operand at the right side<br />

of :=.<br />

The value of a symbol whose data type is REAL can not be<br />

D0 := V_REAL ;<br />

assigned to a D device.<br />

If one operand is a symbol whose data type is REAL, the<br />

other operand must be a symbol whose data type is REAL.<br />

V_LREAL := V_REAL ;<br />

If one operand is a symbol whose data type is LREAL, the<br />

other operand must be a symbol whose data type is LREAL.<br />

The value of a symbol whose data type is TIMER can not be<br />

V_DWORD := V_TIMER ; assigned to a symbol whose data type is DWORD, but can<br />

be assigned to a symbol whose data type is WORD.<br />

The value in a HC device can not be assigned to a symbol<br />

V_WORD := HC0 ; whose data type is WORD, but can be assigned to a symbol<br />

whose data type is DWORD.<br />

11-9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!