Virtual Channels To Daqconnect


ethushara

Recommended Posts

hi,

 

Please let me know is there any possibility to send virtual chanels to daqconnect from daqfactory. If possible please let me knw how can i do it. Because i have some virtual channels resulted after some little big sequences. So it is easy if i can send them to daqconnect directly. otherwise i have to make those sequences again in daqconnect by using raw channels and even i dont know the possibility of doing same sequences in daqconnect same as daqfactory. so please let me know the way to send vitual channels directly to daqconnect from daqfactory.

 

thanks in advance,

 

thushara

Link to comment
Share on other sites

Sure, just do:

 

daqconnect.addValue("tagName", value)

 

where tagName is the name of the tag in DAQConnect (doesn't need to be the same as the name of the V channel), and value is the desired value.  Note if value includes time that time stamp will be used, otherwise it uses the current system time.  So you might do:

 

daqconnect.addValue("myTagName", v.myChannel[0])

 

This assumes of course that you already have a DAQConnect connection established.  You can do that from script to with:

 

daqconnect.initialize("data source write ID")

 

You can get the data source write ID from the DAQConnect dashboard for the data source.  Its a big long string of letters and numbers with dashes.  Make sure and use the Write ID, not the Read.

Link to comment
Share on other sites

thanks a lot for the quick reply. I did according to you and it was working correctly. But next i added around 10 channels to be sent in a script with a one second delay to rotate. after this the data receiving to the daqconnect was got late. it was not regullarly added. sometimes it took around 10 - 20 minutes to update one set. i cannot say exactly the reason is this sequence. anyway i have added it below. please follow it and discuss on this issue.

 

while(1)
   daqconnect.initialize("5899483-491B-4307-A4E6-23E52947FA4A")
   daqconnect.addValue("PLF", v.plantF[0])
   daqconnect.addValue("PLF2", v.plantF2[0])
   daqconnect.addValue("PLF3", v.plantFH[0])
   daqconnect.addValue("DATE", v.DATE[0])
   daqconnect.addValue("HOUR", v.HOUR[0])
   daqconnect.addValue("MINUT", v.MINUT[0])
   daqconnect.addValue("SECOND", v.SECOND[0])
   daqconnect.addValue("PEU1", v.ENERGYU1[0])
   daqconnect.addValue("PEU2", v.ENERGYU2[0])
   Delay (1)
endwhile

 

 

Thanks in Advance,

 

thushara.

Link to comment
Share on other sites

Most likely its a timestamp issue.  If you send a data point with a time stamp older than the most recent one on the server, the data point is thrown away.

 

BTW: do not post your UUID anywhere public.  I've changed it for you in this case, but you really don't want to share your write UUID with anyone.  Read UUID is ok, but with the write UUID, anyone could post data to your account.

Link to comment
Share on other sites

  • 1 year later...

Hi

After for a long time but thought to write on the same topic. Recently I have expanded my Daqconnect channels and then I got to face an issue. Four of my channels are not updating. Everytime I can see only one data point on those in the dashboard channel list. If I delete the channel the channel again comes with the updated data value. Otherwise it remains with an old value.I hope the problem is clear to you now. So please let me know how to rectify this. I hope it is with the time stamp issue as you said above. That's why dropped this under this topic.

Thanks in advance

BR

Thushara

Link to comment
Share on other sites

These tags have not received new data.  on RDP they haven't received new data since June, though your other tags have received data.  On WMB its more recent, ENN11 and 22 since August, and USEN1 and 2 since September 8th.  Most of your others are up to date.  These tags also show only one data point in the history.  The problem is most likely in your data source. Are you using DAQFactory?  When you say you deleted the channel, where did you do this?  In DAQFactory, in DAQConnect data source, or on the page in DAQConnect?

Link to comment
Share on other sites

Hi, 

 

Thanks for your quick response. According to the record in the tags list in Daqconnect the data is not receiving because the time shows very earlier values.  But when I delete these tags in tags list in Daqconnect the tag comes again with the updated data. It confirms that the data is receiving continously.  But the time is not getting changed. It shows the time which was at the very beginning. If you need you can delete my mentioned channels and see what is happening. Any further requirements Pls reply. I use Daqfactory. 

 

Br, 

Thushara 

Link to comment
Share on other sites

We'll check it.  Can you please email the .ctl document that is pushing the data?  I want to check from that side as well.  My first thought is that the data is being sent up, but the time stamp that is being sent up is the same old time stamp.  DAQConnect tosses data that is older or the same time stamp as current data, so the value wouldn't update, but when you delete the tag in DAQConnect, it would recreate it, but with that same time stamp.  Are you sending these tags up from script?  

Link to comment
Share on other sites

We checked the server and my suspicions are correct: you are sending these data points with the same, old time stamp.  Consider using the insertTime() function to ensure that the proper timestamp is used, so instead of:

 

myVal

 

you would do:

 

insertTime(myVal, systime(), 0)

 

This ensures that your value is stamped with the current time

Link to comment
Share on other sites

Hi,

 

actually insertTime function is not clear me as to where i should use it. Anyway below you can see my scripts using to send the variables to the daqconnect. please see them and let me know how should i edit them and insert insertTime. 

 

daqconnect.initialize("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
while(1)
   V.VP3 = P1 (0) + P2 (0)
   daqconnect.addValue("MONTH", v.MONTH[0])
   daqconnect.addValue("YEAR", v.YEAR[0])
   daqconnect.addValue("DATE", v.DATE[0])
   daqconnect.addValue("U3EN1", v.U3EN1[0])
   daqconnect.addValue("U3EN2", v.U3EN2[0])
   daqconnect.addValue("PLFFM", v.PLFM[0])
   daqconnect.addValue("VPP3", v.VP3[0])
   delay (2)
endwhile  
 
daqconnect.initialize("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
while(1)
   daqconnect.addValue("HOUR", v.HOUR[0])
   daqconnect.addValue("MINUT", v.MINUT[0])
   daqconnect.addValue("SECOND", v.SECOND[0])
   daqconnect.addValue("PLFFH", v.PLFH[0])
   daqconnect.addValue("WL", GOV305[0])
   daqconnect.addValue("ENN11", V.INCU1[0])
   daqconnect.addValue("ENN22", V.INCU2[0])
   DELAY (3)
endwhile
 

the tags having the discussed problem is in red color.

 

BR,

 

Thushara

Link to comment
Share on other sites

If you look at those channels in the V channel view I think you'll see that the time stamp on them is old, even in DAQFactory.  Inserttime goes here for example:

 

daqconnect.addvalue("ENN11", insertTime(v.incu1[0], systime(), 0))

 

do that for all 4 and it won't matter what the v channel shows the timestamp as.

Link to comment
Share on other sites

Archived

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