Cursor Problem on LK204-7T-1U
Posted: Mon Oct 18, 2010 10:34 pm
Hi,
I'm using a LK204-7T-1U using RS232 serial and programming with C on a PLC. I can read and write to it fine and can get it to display all the information I want without any issues and process key presses.
But I want it to display the blinkling block or underline cursor and no matter what I do, I cannot get the cursor to move from the home position.
my code to set the cursor position is below:
void setCursor(char row, char col)
{
unsigned char cursorCmd[4];
auto int cmdResult;
cursorCmd[0] = 254;
cursorCmd[1] = 71;
cursorCmd[2] = (unsigned char) col;
cursorCmd[3] = (unsigned char) row;
cmdResult = lcdWrite(cursorCmd, sizeof(cursorCmd));
}
I call this command setCursor(row, col) in a different part of my code and I have tried passing it a variety of parameters but the blinking block always stays at home position.
I also cannot use the Cursor move function (254, 77), the cursor just will not budge.
I can disable and enable the cursor without any problems using (254,83) and (254,84), but it always remains in the home position.
Regards,
Steven
I'm using a LK204-7T-1U using RS232 serial and programming with C on a PLC. I can read and write to it fine and can get it to display all the information I want without any issues and process key presses.
But I want it to display the blinkling block or underline cursor and no matter what I do, I cannot get the cursor to move from the home position.
my code to set the cursor position is below:
void setCursor(char row, char col)
{
unsigned char cursorCmd[4];
auto int cmdResult;
cursorCmd[0] = 254;
cursorCmd[1] = 71;
cursorCmd[2] = (unsigned char) col;
cursorCmd[3] = (unsigned char) row;
cmdResult = lcdWrite(cursorCmd, sizeof(cursorCmd));
}
I call this command setCursor(row, col) in a different part of my code and I have tried passing it a variety of parameters but the blinking block always stays at home position.
I also cannot use the Cursor move function (254, 77), the cursor just will not budge.
I can disable and enable the cursor without any problems using (254,83) and (254,84), but it always remains in the home position.
Regards,
Steven