Author Topic: new features  (Read 1536 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
new features
« on: January 31, 2015, 10:10:54 AM »
Archie can you give an overview of the new Datasubscriber and BasicDatalogger features?  I see there is now a collection field for these but the editor does not allow me to add anything.  Also the Datasubscriber can now be used for multiple registers by seperating with a comma such as 40001,40002,40003 etc.  how do you access the value of each register?  Thank you.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: new features
« Reply #1 on: January 31, 2015, 10:34:59 AM »
The DataSubscriber allows multiple values in the PLCAddressValue field by separating with a comma. The values from any of the registers in the list will be all returned to the same event handler. To distinguish which value is returned, you can use the "e" object. For example:

If e.PLCAddress="40001" then
   Msgbox "The value for 40001 = " & e.values(0)
elseif e.PLCAddress="40002" then
   Msgbox "The value for 40002 = " & e.values(0)
end if


Since the BasicDataLogger inherits from the DataSubscriber, it also gets this feature. If multiple values are listed in the PLCAddressValue, then the latest returned value for all of them will be written to the text file. There is still an issue yet to be resolved. The values in the text file are not always written in the same order as listed in the PLCAddressValue property.

pdonald

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: new features
« Reply #2 on: March 18, 2015, 02:38:28 PM »
Hello Archie. I've just started using this and find it very good so far. I'm coming from Factorytalk and was looking for an alternative that actually worked. I'm on the learning curve though with AdvancedHMI and VBA.

I have a rather complicated project that uses contrologix and a PC attached to a machine with a lot of tags ( about 200 I/O and 1500 tags so far ) to monitor control and act on. I have a similar one running on Omron CJ2M and Programmer/Supervisor.

Anyway to get down to specifics I have a form with displays for 75 round wafers in 3 cassettes. The wafers are contiguous and the tags are
WAFER[0].STATUS,WAFER[1].STATUS  to WAFER[74].STATUS. I am representing these on the display as a line with variable colors. I used the M.VB.Powerpacks.Lineshape for this as I don't see anything in the AdvancedHMI control lineup.

I have tried to access these in a beginread loop and substitute a loop variable in the name to access the tag and change the display Line control. but it did not accept what i did as a control name.

I would like to use the DataSubscription to get the data as it changes and i see some of how it works. I put 4 addresses in the DS to test it. Does the DS only return one item at a time as the data changes? What happens if 2 change? Does it take 2 passes to handle it?

Any help would be appreciated.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: new features
« Reply #3 on: March 18, 2015, 02:57:30 PM »
I would like to use the DataSubscription to get the data as it changes and i see some of how it works. I put 4 addresses in the DS to test it. Does the DS only return one item at a time as the data changes? What happens if 2 change? Does it take 2 passes to handle it?
When putting multiple addresses in a DataSubscriber, it will only return 1 value at a time to the event handler. If 2 change simultaneously, then the event will fire twice. To know which value you are getting, you will need to check the value of e.PLCAddress .