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

TOPIC: Boolean Write Issue to Mounted Object

Boolean Write Issue to Mounted Object 1 year 5 months ago #11780

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

We have three controllers running on the same bus and configured in the same project. So, all are QCOM friendly. All controllers are working great. Two Operator Stations are operational and a History Server is gathering data.

Recently, there is a need to share a small amount of data from one controller to another. A mount object is configured on one controller [1] that references the data base of the other controller [2]. Mounted values are reading, as expected.

There is boolean permit flag in controller [2] with no mount object. The permit flag can be toggled from the other controller [1] via the mounted object database. The boolean flag can be toggled manually from the RTNavigator and changed using Push Buttons on a graphic from controller [1]. However, we cannot change the boolean state from PLC code in Controller [1]. We tried SetDV amd ResDV from a PLC program, but the boolean did not change. We also tried CStoExtBoolean from Controller [1], but that did not work either. In fact, the CStoExtBoolean caused some weird QCOM issues that required a controller [2] restart to fix.

We are encouraged because the boolean flag can be manually toggled, but need some advice and direction on PLC coding.

1) Are there write permissions needed? Both controllers are running as user: pwrp.
2) Should the scheme be swapped, so controller [2] pulls data from controller [1]?
3) Is there a different PLC code block we should be using to push boolean values from [1] to [2]?

We need the boolean to change state on conditional write. We are searching for a plc coding trick to achieve our goal.

Regards,
Ron
Last Edit: 1 year 5 months ago by AutoMate.
The administrator has disabled public write access.

Boolean Write Issue to Mounted Object 1 year 5 months ago #11781

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Ron,

The plc code is optimized for speed and realtime performance and is using direct pointers to read and write values in the database. For remote objects subscriptions are set up, and the pointers are pointing to the subscribed values. But as this is a one way communication, writing to remote objects will not work. To be able to write to remote objects, the database mutex has to be used and that will jeopardize the realtime performance and is avoided in all common objects. There are some exceptions though, like the CStoExt objects that actually should be able to write to remote objects. Note that you have to specify the Dv with '.ActualValue'.

For the HMI realtime performance is not an issue and it has no problems with writing to remote objects.

1) No permissions are needed in the plc code.
2) Yes, this is an alternative.
3) CStoExtBoolean should work, but should be used with care as it uses the database lock.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: AutoMate

Boolean Write Issue to Mounted Object 1 year 5 months ago #11785

  • AutoMate
  • AutoMate's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 159
  • Thank you received: 5
  • Karma: 1
Appreciate your quick and lengthy reply.
Thanks!
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.853 seconds