Create a graph with data of a remote copy


rmartinez

Recommended Posts

Hello,

I have created two applications by DaqFactory. One application only acquires data.

In the second application, I have a connection to a remote copy and different displays to view and control the devices of the plant.

In the main application I have created a graph display and I want to display the evolution of the remote channels. In the application of acquisition of data, the channels have 3600 points of history and 999999 points of persist.

Can I use the persist file created of the remote application to display information on the graph? Now I only display the history length.

Thanks.

Rosa

Link to comment
Share on other sites

No, you don't even have access to the history on the server copy (the one acquiring data). The data streams in and you only see data that has accumulated since the startup of the remote (non-acquiring) copy. There are several ways around this:

1) use a database as an intermediary.

2) use the getHistory() function of a connection. So, if your connection is called "Server", to get history for a channel from that connection you'd do:

Server.getHistory("myChannel", startTime, endTime)

where myChannel is the name of the channel you want to get history from (as a string), and startTime and endTime are the start and end time ranges in DAQFactory time (seconds since 1970). This will cause the server to push any historical data it has in that range and merge that with the history for the channel on the requesting computer.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.