Daggos

Remote channel Persistence

Recommended Posts

Hi,

Q1) With the remote license is there a way for it to use the persist file from the server?

Remote will only show history of the time that its been running and way to use local persist files.

Q2) If i cant use the persist files from the server can i make the remote use local save persist?

Share this post


Link to post
Share on other sites

What do you mean by a remote license?  You mean a remote copy of DAQFactory connecting to another copy of DAQFactory?

 

Share this post


Link to post
Share on other sites

So, first a short explanation: DAQFactory is used in a very wide variety of applications and as such, a few things that might be feasible to be automatic in certain applications is not automatic in DAQFactory because in other applications it can cause complications.  For example, if DAQFactory is running on a remote site with limited bandwidth, accessing the full history from the remote would cause problems.  As such, this is not automatic.  Instead, you have to use a function to request the data on startup.  The function goes something like this:

myConnection.GetHistory(channelName, startTime, endTime)

The data transfer is async, so the function will return immediately, and once the remote gets the command it will send the data back if available, and put it in the channel locally.

This is a somewhat undocumented feature and not often used so I don't remember if it goes to persist.  I suggest just giving it a try and see how it works for you.

Share this post


Link to post
Share on other sites

Thanks have added to a sequence on start 

remotelite.GetHistory(HV_Power_Active, startTime, endTime)

 

How would i use the start time and end time i figured with SysTime() for end time. I cant just put how many points i want?

Share this post


Link to post
Share on other sites

It is actually just a subset on the other end, so you could just use index, i.e:

remotelite.GetHistory(HV_Power_Active, 0, 99)

On the remote it just does:

remotelist[0,99] 

and sends it back.

 

Share this post


Link to post
Share on other sites

Thanks,

I have made a sequence on the remote pc with

remotelite.GetHistory(HV_Power_Active, 0, 3000)

But it isn't working, remote connection is called remotelite.

I'm running on a non full stream

Share this post


Link to post
Share on other sites

I have a chart with expression       HV_Power_Active [0, 3000] on the runtime copy

Share this post


Link to post
Share on other sites

You need to provide the channel name in quotes.  Otherwise the function looks for the value of the symbol HV_Power_Active locally.  So it should be:

remotelite.GetHistory("HV_Power_Active", 0, 3000)

Note that GetHistory will clear the history on the machine that calls the function.  The new data coming in overwrites any data already accumulated.

Share this post


Link to post
Share on other sites

Thanks

I managed to get it working with 

system.remotefull.GetHistory("HV_Power_Active", 0, 3600)

remotefull being a full stream connection as it wont work with the lite stream.

Also when i set the 3000 to 10,000 it downloads clearly from the persistence data and displays on remote version for a second or 2 then goes back to just 3600. (When i did this server HV_Power_Active history was set at 3600)

 

So 3600 data points is good alot better than none. I guess if there is a way for me to save the data to persistence on the remote that would be good.

I also change the history length for HV_Power_Active on the server to 10,000 so i can load up 10,000 points on the remote copy and it stays.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now