I have a KRC2 with KSS 4.1.4 and I am trying to connect an external HMI screen via serial using com3.
In order to do this, I enabled the com3 port in hw_inf.ini and changed the settings of the port to fit the screen settings.
9600, proc 4 (XonXoff), stop bit 1, Xon value = Xoff value = 0.
On the other hand, I am trying first to connect the robot to my laptop using a USB-DB9 adapter and a db9 female -db9 female connecting:
db9 PC side ------- db9 robot side
1+4+6 1+4+6
2 ------------------------------- 3
3 ------------------------------- 2
5 ------------------------------- 5
7+8 7+8
9 9
The problem comes when I try to send data with CWRITE.
MW_T=#SYNC ; Initialize synchronous transmission
MR_T=#COND ; Initialize active reading
TIMEOUT=6.0 ; Initialize timeout after 3 seconds
OFFSET=0 ; Read from 1st character
CWRITE(HANDLE,SW_T,MW_T,"%c%c%c","c","o","n")
; the status component SW_T.RET1 checks whether the transmission was successful
IF (SW_T.RET1<>#CMD_OK) THEN
HALT ; transmission error
ENDIF
The thing is that I know I'm passing this part of the code successfully because right after that I have a CREAD command that is working perfectly (so we also know that COPEN is working too), and also SW_T.RET1 has the value #CMD_OK so the robot thinks that it sent the information.
I also checked using telnet if something was wrong but it shows that it did send the data too
The USB to db9 male is also working fine because I can connect both the laptop and the HMI without any problem.
I also tried with a different hardware (a whole new PC with the same HDD)
If anyone has any idea I would appreciate it a lot.
Thank you,
Jorge