Welcome, Guest
Username: Password: Remember me

TOPIC: Inv function does not invert

Inv function does not invert 5 years 3 months ago #10078

  • TrygveHe
  • TrygveHe's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi

I have some constrains for a heater in my brewery PLC. I have inserted a few INV blocks. I previously inverted the input to the AND block but didn't get the results I was expecting. When running the PLC some of the signals does not get inverted while others are. What could cause this?

Regards
Trygve



PLC_Invert.jpg
The administrator has disabled public write access.

Inv function does not invert 5 years 3 months ago #10083

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
Hi Trygve,

Either the plc program wasn't built correctly or the plc thread is not running any more.
Did you build the node from the root volume? Did you build the node you are running. Note that you can build the node from scratch by setting build force in settings, and then build the node.

Also check that the thread is still running by looking at the loop counter in the PlcThread object.

Inverting the inputs of the and gate or using inv objects will give the same result.

/Claes
The administrator has disabled public write access.

Inv function does not invert 5 years 2 months ago #10092

  • barnes
  • barnes's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 92
  • Karma: 0
Wow, that is starting to look complicated.

I have found that some logic is better placed outside of proview and inside a small external PLC.

Just a thought.

Did you figure out your problem?
Last Edit: 5 years 2 months ago by barnes.
The administrator has disabled public write access.

Inv function does not invert 5 years 2 months ago #10104

  • TrygveHe
  • TrygveHe's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi

I did now build the node with force and the PlcThread is counting, but still the signals are not inverted. But I have an error indication on the Plc-100ms-Alarm, but cant figure out what the alarm is. Screenshot attached.

There are several other Plc's running and I haven't noticed anything wrong in them.


2019-01-04-191640_534x727_scrot.png
The administrator has disabled public write access.

Inv function does not invert 5 years 2 months ago #10109

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
Hi Trygve,

Detectcount is 490 and CycleCount 1157 with means that nearly every second scan is delayed more than 100 ms. You can see some statistics of the cycle time in the PlcThread object. Can be that you have a heavy load and threads with higher priority runs first, or there is some slow I/O on this thread, maybe not responding and causing timeouts, that is causing the delay.

I doubt that this will affect the inverter problem though. I'm still not convinced that you run the latest plc code. Check with 'ps x' which plc is running and check the file for this on $pwrp_exe, and that you really create a new executable when you build the node.

/Claes
The administrator has disabled public write access.

Inv function does not invert 5 years 2 months ago #10127

  • AutoMate
  • AutoMate's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 159
  • Thank you received: 5
  • Karma: 1
TrygveHe,

A small PLC program was built in version 5.5 to test the INV function. On my development system, INV function works fine. Note: AND blocks support inverse inputs. In your example logic, separate INV blocks are not needed.

Regards,
Ron
Attachments:
The administrator has disabled public write access.
Time to create page: 7.852 seconds