41CL Serial Communication Testing
|
09-24-2016, 02:49 AM
(This post was last modified: 09-24-2016 03:11 AM by Sylvain Cote.)
Post: #1
|
|||
|
|||
41CL Serial Communication Testing
I have been receiving question about the 41CL serial port and how to validate the serial link.
This is a small test setup to check if the serial communication between your Windows PC and the 41CL works. Note: macOS & Linux section users will come later. Load the following FOCAL program into your 41CL Code: 01♦LBL "SPTST" XEQ "SPTST" first to configure the registers and 41CL memory data LBL A -> 41CL Sending ABABABAB... to the PC at 1200 bauds LBL B -> 41CL Sending ABABABAB... to the PC at 2400 bauds LBL C -> 41CL Sending ABABABAB... to the PC at 4800 bauds LBL D -> 41CL Sending ABABABAB... to the PC at 9600 bauds LBL F -> 41CL Receiving PC pressed keys at 1200 bauds LBL G -> 41CL Receiving PC pressed keys at 2400 bauds LBL H -> 41CL Receiving PC pressed keys at 4800 bauds LBL I -> 41CL Receiving PC pressed keys at 9600 bauds Windows Users: I am using RealTerm on the PC for this demonstration. On the Windows PC a) Download & install RealTerm b) Start the Windows "Device Manager" and look under "Port (Com & LPT)" to find your serial port (COM?) c) Start RealTerm, under the "Port" tab c1) Select "Port" number found on step (b) c2) Set "Parity" to "None" c3) Set "Data Bits" to "8" c4) Set "Stop Bits" to "1" c5) Set "Hardware Flow Control" to "None" Test #1 : 41CL is sending and PC is receiving at 1200 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 1200 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) PC ---> Press the "Clear" button under the output window to erase it CL -> Press the A button (same as XEQ A) and the message "SENDING 1200" should be displayed PC -> You should see in the output window a series of "ABABAB..." on the display CL -> Press the R/S button to stop the program Test #2 : 41CL is sending and PC is receiving at 2400 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 2400 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) PC ---> Press the "Clear" button under the output window to erase it CL -> Press the B button (same as XEQ B) and the message "SENDING 2400" should be displayed PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display CL -> Press the R/S button to stop the program Test #3 : 41CL is sending and PC is receiving at 4800 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 4800 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) PC ---> Press the "Clear" button under the output window to erase it CL -> Press the C button (same as XEQ C) and the message "SENDING 4800" should be displayed PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display CL -> Press the R/S button to stop the program Test #4 : 41CL is sending and PC is receiving at 9600 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 9600 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) PC ---> Press the "Clear" button under the output window to erase it CL -> Press the D button (same as XEQ D) and the message "SENDING 9600" should be displayed PC -> You should see in the RealTerm output window a series of "ABABAB..." on the display CL -> Press the R/S button to stop the program Test #5 : PC is sending and 41CL is receiving at 1200 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 1200 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) CL -> Press the F button (same as XEQ F) PC -> Activate the RealTerm application PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a) PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A) PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed) CL -> Press the R/S button to stop the program CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue Test #6 : PC is sending and 41CL is receiving at 2400 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 2400 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) CL -> Press the G button (same as XEQ G) PC -> Activate the RealTerm application PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a) PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A) PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed) CL -> Press the R/S button to stop the program CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue Test #7 : PC is sending and 41CL is receiving at 4800 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 4800 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) CL -> Press the H button (same as XEQ H) PC -> Activate the RealTerm application PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a) PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A) PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed) CL -> Press the R/S button to stop the program CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue Test #8 : PC is sending and 41CL is receiving at 9600 bauds PC -> In RealTerm, under the "Port" tab PC ---> Set "Baud" to 9600 PC ---> Press the "Open" button to close the com port (button should be raised) PC ---> Press the "Open" button to open the com port (button should be depressed) CL -> Press the I button (same as XEQ I) PC -> Activate the RealTerm application PC ---> Type the letter "a" on your PC keyboard and you should see "832003-0061" on the CL display (61 = ASCII value of a) PC ---> Type the letter "A" on your PC keyboard and you should see "832003-0041" on the CL display (41 = ASCII value of A) PC ---> Type any letters on your PC keyboard and you should see "832003-00??" on the CL display (?? = ASCII value of the key pressed) CL -> Press the R/S button to stop the program CL -> if you wait more than 10 seconds before pressing a key on your PC the 41CL will show the "TIMEOUT" message, when that happen just press the R/S key to continue EDIT: typos |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
41CL Serial Communication Testing - Sylvain Cote - 09-24-2016 02:49 AM
RE: 41CL Serial Communication Testing - aurelio - 09-24-2016, 12:59 PM
RE: 41CL Serial Communication Testing - aurelio - 11-19-2016, 01:19 PM
RE: 41CL Serial Communication Testing - Monte Dalrymple - 11-19-2016, 02:31 PM
RE: 41CL Serial Communication Testing - aurelio - 11-19-2016, 03:01 PM
RE: 41CL Serial Communication Testing - aurelio - 11-26-2016, 02:26 PM
RE: 41CL Serial Communication Testing - aurelio - 11-27-2016, 10:43 PM
|
User(s) browsing this thread: 1 Guest(s)