Reaper2050
Programmer
- May 25, 2012
- 12
Hi All,
I have a project where I have to communicate with a serial port. Sending and receiving to the serial port from a programming side is new to me.
I have purchased Capesoft WinEvent for sending to serial port.
What is the best why to accomplish the following.
COMMAND 6 : OBTAIN LAST TRANSACTION DETAILS
COMMAND WORDS INTERPRETATION
F X Command next for MPD unit number X
Y 6 Y = Hose number, 6 = Command number
B 0 End of command
The above set of command words instructs the addressed hose on the addressed MPD unit to transmit details of the last completed transaction.
This command must be accepted for any hose status other than BUSY.
The MPD unit replies within 50 msec with the following data :
REPLY WORDS INTERPRETATION
D X Reply next from MPD unit number X
E Y Y = Hose number
E P ~
E P | The price per unit in BCD format
E P | P = 0 to 9
E P ~
E M ~
E M |
E M | The money amount in BCD format
E M | M = 0 to 9
E M |
E M ~
E V ~
E V |
E V | The volume in BCD format
E V | V = 0 to 9
E V |
E V ~
E Z Z = Checksum
A 0 End of reply
The BCD digits in the above reply structure are identical to those on the MPD main display as they appeared immediately after the addressed hose completed its last transaction.
In all cases the least significant digit is transmitted first. By convention the decimal point positions are identical to those of the MPD main display.
Thanks in advance.
Regards,
Adriaan
I have a project where I have to communicate with a serial port. Sending and receiving to the serial port from a programming side is new to me.
I have purchased Capesoft WinEvent for sending to serial port.
What is the best why to accomplish the following.
COMMAND 6 : OBTAIN LAST TRANSACTION DETAILS
COMMAND WORDS INTERPRETATION
F X Command next for MPD unit number X
Y 6 Y = Hose number, 6 = Command number
B 0 End of command
The above set of command words instructs the addressed hose on the addressed MPD unit to transmit details of the last completed transaction.
This command must be accepted for any hose status other than BUSY.
The MPD unit replies within 50 msec with the following data :
REPLY WORDS INTERPRETATION
D X Reply next from MPD unit number X
E Y Y = Hose number
E P ~
E P | The price per unit in BCD format
E P | P = 0 to 9
E P ~
E M ~
E M |
E M | The money amount in BCD format
E M | M = 0 to 9
E M |
E M ~
E V ~
E V |
E V | The volume in BCD format
E V | V = 0 to 9
E V |
E V ~
E Z Z = Checksum
A 0 End of reply
The BCD digits in the above reply structure are identical to those on the MPD main display as they appeared immediately after the addressed hose completed its last transaction.
In all cases the least significant digit is transmitted first. By convention the decimal point positions are identical to those of the MPD main display.
Thanks in advance.
Regards,
Adriaan