|Question:||In MotionWorks IEC, what causes the Misaligned Datatype error and how can it be resolved?|
|Answer:||The Misaligned Datatype error occurs when a variable is assigned to a hardware location such as %I or %Q, and the specified address is not in alignment with the starting address of the I/O driver. |
For example, if the drivers starting address is %IB1000, data elements assigned in the memory area of the driver must have a remainder of zero when performing the following calculation:
((MyDataAddress - DriverHeadAddress) MOD MyDataSize) = Remainder
Where MyDataSize is in bytes.
If an LREAL is assigned at %IL1017 the calculation shows that the value is misaligned.
((1017 - 1000) MOD 8) = 0.125 (Misaligned)
If the LREAL data is moved to %IL1024, the the data is aligned:
((1024 - 1000) MOD 8) = 0 (Aligned)
To see the head address of the driver, look at the I/O Group header in the Global Variables list, or look at the IO_Configuration screen, which is populated by the Hardware Configuration.
Global Variables List
Elementary DataType Reference from MotionWorks IEC help system:
|Product:||MotionWorks IEC, MP2000iec Series, MP2300Siec, MP2310iec, MP2600iec, MP3200iec |
|Category:||Instructions; Programming; Software; Troubleshooting|
|Part/Model#: ||MotionWorks IEC, MotionWorks IEC Pro, MP2300Siec, MP2310iec, MP2600iec, MP3200iec|
|Link to related files:|
SAFETY PRECAUTIONS AND INSTRUCTIONS FOR USE OF FAQ INFORMATION!
Please read and understand the product instruction manual before installing, servicing or operating Yaskawa products. FAQ content and illustrations are provided as technical advice to augment the information in manual, not superceed it. It is not possible to give detailed instructions for all types of installation or support activities. The information described in the FAQs are subject to change without notice to improve the product or FAQ. Yaskawa assumes no responsibility for errors or omissions or damages resulting from the use of the information contained in any FAQ.
All warnings, cautions and product instruction for product use must be followed. Installation, operation and maintenance should be carried out by qualified personnel. Failure to observe these and other precautions highlighted in the product manuals will expose the user to high voltages resulting in, serious injury or death. Qualified personnel are defined as individuals who are familiar with the installation, starting, operation and maintenance of Yaskawa products of the type described and have proper qualifications to perform the work.