AH Motion Controller – Standard Instructions Manual Graphic expression: _3 D : Device in which the result Explanation: 1. D : The device in which the current time is stored 2. The operand D occupies seven consecutive devices. 3. The built-in real-time clock in the CPU module provides the data relating to the year, the week, the moth, the day, the minute, and the second. The data is stored in SR391~SR397. The instruction TRD is used to read the current time into the seven registers. 4. The first two digits of the year number for A.D. from the right are stored in SR391. Example: When M0 is ON, the current time is read from the real-time clock into D0~D6.
The value 1 in SR397 represents Monday, the value 2 represents Tuesday, and by analogy, the value 7 represents Sunday. 3-422 FB/FC Instruction Operand Description FC TRD P D Reading the time BOOL WORD DWORD LWORD UINT UDINT INT DINT LINT REAL LREAL TMR CNT STRING Data type D Device X Y M S T C HC/AC D L SM SR E PR K 16# “$” D F D Pulse instruction 16-bit instruction 32-bit instruction AH Motion CPU AH Motion CPU - Special data register General data register Item Value Item SR391 Year (A.D.) 00~99 D0 Year (A.D.) SR392 Month 1~12 D1 Month SR393 Day 1~31 D2 Day SR394 Hour 0~23 D3 Hour SR395 Minute 0~59 D4 Minute SR396 Second 0~59 D5 Second SR397 Week 1~7 D6 Week