Transmitting a Value Bigger than 65,535 in BCD Format with TXD Instructions

Transmitting a Value Bigger than 65,535 in BCD Format with TXD Instructions
Application Note:
Transmitting a Value Bigger than 65,535
in BCD Format with TXD Instructions
You can transmit values from 0 up to 99,999,999 by using the following method.
(1) If a 32-bit value is contained in data registers D0 and D1, you need to convert
this value to hex values using HTOB(D) instruction.
The table below shows examples of conversion results.
32-bit value contained in D0\D1
D2
D3
0
0000h
0000h
1234
0000h
1234h
65535
0006h
5535h
190000
0019h
0000h
12345678
1234h
5678h
99999999
9999h
9999h
Note: If the value contained in D0\D1 is bigger than 99,999,999, a user
program execution error occurs and ERROR LED turns on.
(2) If you want to transmit a 6 digit value with a TXD instruction, you need to
configure S1 of the TXD as follows.
Upper 2 digits setting
Lower 4 digits setting
For more information please call 800-262-IDEC or email support@idec.com.
1
The TXD instruction dialog box will appear, as shown here:
Click OK to close the dialog box.
2
For more information please call 800-262-IDEC or email support@idec.com.
(3) Before downloading the program to a PLC, ensure that the communication
settings on the port used by the TXD instructions is configured correctly. To
check the communication settings, select Function Area Settings… from the
Configure menu, and then go to the Communication tab.
(4) Download the program to the PLC.
(5) With this example, when you turn on M0000, TXD2 instruction will transmit
the data.
If the 32-bit value contained in D0\D1 is 0, TXD2 instruction transmits the
following data:
“0”
“0”
“0”
“0”
“0”
“0”
30h
30h
30h
30h
30h
30h
If the 32-bit value is 1234, TXD2 instruction transmits the following data:
“0”
“0”
“1”
“2”
“3”
“4”
30h
30h
31h
32h
33h
34h
If the 32-bit value is 12345678, TXD2 instruction transmits the following data:
“3”
“4”
“5”
“6”
“7”
“8”
33h
34h
35h
36h
37h
38h
For more information please call 800-262-IDEC or email support@idec.com.
3
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising