Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RockB

Pages: [1]
1
Thanks, Archie! that worked.

I am getting temperature values from ModbusTCP. I want to plot them on a trend chart with moving X-axis. The scale of the Y-axis is usually fixed. I want X-axis to show time.

Which of the charts should I use: Basic Trend Chart, chart by array or chart by sampling? 


2
@Archie When I try to Add addresses to "PLCAddressValueItems" in properties of datasubscriber2, I get an error saying "Object does not match the target type"

Edit: I have also observed this problem when I add "ChartBySampling" component and try to edit the "PLCAddressItems" property.

I am using the latest version of Advanced HMI (AdvancedHMIv399xR1). The solution of VS2017 has three projects in it: AdvancedHMIcs, AdvancedHMIDrivers and AdvancedHMIControls. I have manually removed the AdvancedHMI (vb project) since this going to be a C# application.

I have manually added "MfgControl.AdvancedHMI.Controls.dll" and "MfgControl.AdvancedHMI.Drivers.dll" references to AdvancedHMIcs project

3
Hello,

I am trying to get data from Input holding registers from a PLC through ModbusTCP communication. I have added the ModbusTCP driver to MainForm.cs and have set the IP address.

I have two digital panel meters in the MainForm. If I set the "PLCAddressValue" property for these components and run the applications, I get the data just fine. However, the Incoming data has to be modified before it is displayed on the meter. For this purpose, I am exploring the DataSubscriber

I understand that Data subscriber automatically refreshes the data values. Thus, this avoids calling
Code: [Select]
modbusTCPCom1.BeginRead("address") repeatedly.

I want to subscribe to 8 consecutive registers. Their addresses are as follows: 40001 to 40008. How can get the values of these registers using data subscriber? I have gone through few posts and have this so far

Code: [Select]
private void MainForm_Load(object sender, EventArgs e)
        {
            Int val1 = modbusTCPCom1.Subscribe("40001",1,100, SubscribeCallBack);
        }

Question 1: How can I read/store values of all registers into an integer array and read individual values later? Do I need an individual subscription for each of those registers?

Question 2: What should the "SubscribeCallBack" event include to handle communication lost to PLC?

Question 3: What is the difference between DataSubscriber and DataSubscriber2?



Pages: [1]