Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: comparison not work

comparison not work 6 years 7 months ago #9213

  • sony2017
  • sony2017's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Karma: 0
hello,
After I able to read input register, I try to compare the input value but seem not work.
I setup the input comparator as Int32 representation.
See my picture.
How to do correct?

Sony
Attachments:
The administrator has disabled public write access.

comparison not work 6 years 7 months ago #9218

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3176
  • Thank you received: 501
  • Karma: 133
Hi Sony,

If you set representation to Int32 you will put the content of two registers into one Ii. I don't know if that is what you want.

The Modbus registers usually are Int16 and should be read by channels with representation Int16. The Ii.ActualValue though is Int32 so the register values will automatically be converted to Int32.

But the IGt shoud work regardless of this and looks as if the code for the IGt is not executing. Did the 'build node' succeed without error messages? Did you build the correct node? Did you restart runtime? Is the plc thread acually runnig (check the loopcounter in the PlcThread object) ?

/Claes
The administrator has disabled public write access.

comparison not work 6 years 7 months ago #9223

  • sony2017
  • sony2017's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Karma: 0
I think not only comparison but all inststruction in the integer object pallete also can't work :(
I made a testing plc program from get starting document also not work. (see my attchment)

Please give me example lets say comparison with input from Getli instruction.

Sony
Attachments:
Last Edit: 6 years 7 months ago by sony2017.
The administrator has disabled public write access.

comparison not work 6 years 7 months ago #9226

  • sony2017
  • sony2017's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Karma: 0
Hello,
I test logic programming like shown in "getting started guide" page 20 is work properly.
And I test analog programming like shown in "getting started guide" page 28 but not work. The result of 'ADD' instruction is always zero eventhough the input is not zero value.
Why the logic program work but analog program not work? whereas logic and analog in one program.

What wrong in my pwr55? please help.

Sony
The administrator has disabled public write access.

comparison not work 6 years 7 months ago #9227

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Hi Sony.

Works with me (in pwr55), strange ?
It seems your PLC doesn't run. Is it connected to the 100ms Timer Thread ?





trange_2.png


strange_3.png



/Bruno
Last Edit: 6 years 7 months ago by brunad.
The administrator has disabled public write access.
The following user(s) said Thank You: sony2017

comparison not work 6 years 7 months ago #9234

  • sony2017
  • sony2017's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 26
  • Karma: 0
Hello,
I think my problem come from 'Build' step. It's not as usually that just one click all change compiled.

Sony
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.414 seconds