Author Topic: HMI displays wrong value  (Read 12185 times)

cdenk

  • Full Member
  • Posts: 161
  • newbie
    • View Profile
HMI displays wrong value
« on: September 20, 2005, 02:35:30 PM »
With a T100MD-888+ AND MD-HMI240 running a simple program:
A= ADC(1)
SETLCD 1,1,STR$(A)

(There are a few other statements that are (') out)

The HMI (both the HMI and it's online counterpart) and online monitoring values for variable "A" differ for some input values.

ADC (1)    online              HMI
input         Variable     and online lcd display
values       "A"                  Values
volts          values

0.34                 280            2806
1.55               1268            1268
2.84               2332            2332
4.15               3400            3400

Note that only the lowest values are funny, the others are tracking OK.
The ADC input is from an LM324N OP-AMP with input from 4 resistances switched.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HMI displays wrong value
« Reply #1 on: September 20, 2005, 11:32:51 PM »
Do this:

  SETLCD 1,1,STR$(A)+"   "

this will erase some past display in the LCD position when it display a shorter string than previously.

Alternatively, you can clear up the location where the value is to be displayed first, then execute SETLCD command.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

cdenk

  • Full Member
  • Posts: 161
  • newbie
    • View Profile
Re:HMI displays wrong value
« Reply #2 on: September 21, 2005, 06:34:21 AM »
Thanks for the quick reply, but the number of spaces " " inside the quotes needs to be at least the number of maximum digit (characters) that might be displayed. With the HMI putting out a maximum of 4 characters, it looks like "    " (4 spaces). It would be nice that the HMI would take care of this detail automatically, and elimiate the flashing of the display. I guess a couple of "if's" checking for change of how many digits would take care of that. :)

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HMI displays wrong value
« Reply #3 on: September 21, 2005, 04:54:38 PM »
One other way is to use STR$(n, m) so that the converted string is of fixed number of characters and you will not have the problem of variable length string ocupying different position on the display.

The cursor can be turned on/off, change to block or underscore  using the SETLCD 0,0, CHR$(n) where n is an integer. Please refer to the PLC's installation guide for the correct n value to turn off the cursor if that's what you want to do.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

cdenk

  • Full Member
  • Posts: 161
  • newbie
    • View Profile
Re:HMI displays wrong value
« Reply #4 on: October 26, 2005, 08:23:16 AM »
Thanks, the above solved problem :)

FQ-ONG

  • Jr. Member
  • Posts: 61
    • View Profile
Re:HMI displays wrong value
« Reply #5 on: June 19, 2006, 04:45:04 AM »
The cursor can be turned on/off, change to block or underscore  using the SETLCD 0,0, CHR$(n) where n is an integer. Please refer to the PLC's installation guide for the correct n value to turn off the cursor if that's what you want to do.

I can't found it on PLC's installation guide?
May I know which page on PLC's installation guide?

Thank you.


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:HMI displays wrong value
« Reply #6 on: June 19, 2006, 09:17:32 AM »
It is the 8 page white booklet, not the User Manual. You should be able to find it in page 4 or 5.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS