Daggos

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Daggos

  1. Hi, I'm trying to get the average of 5 channels as 1 average for all. How would i go about that?
  2. Ok after testing this seems to be working such an easy fix, thanks.
  3. Thanks for your reply i will test the alarm.paused but will that not just delay the alarm going off when you set alarm.paused back to 0 My alarm is for a pump min(TestBit(miri_16_Digital_in,7)[systime(), systime() - 60]) > 0 So if its off for 60 secs then alarm. Once i unpause will the alarms wait the full 60 secs?
  4. Hi, Is there a way to make it not alarm on DAQFactory start. I have DaqFactory process restart schedule and sometimes one startup it alarms why say a pump is off waiting for water.
  5. Thanks for that, working now but i was actually trying to make it work with an average. the below fails with improper number of parameters. flowdiff5.addValue(insertTime(mean(Pond9_Flow [0,1800]) - mean(PS_1_Flow_Outlet [0,1800])),systime(),0) but this works without the systime do i need it ? while(1) delay (2) flowdiff5.addValue(mean(Pond9_Flow [0,1800]) - mean(PS_1_Flow_Outlet [0,1800])) delay (2) endwhile Thanks for your help.
  6. Hi Im trying to Graph a global variable, can this be done, not sure as it doesn't have any history only current value. Global flowdiff = (Pond1_5_Flow[0]+Pond6_Flow[0]+Pond8_Flow[0]+Pond9_Flow[0]) - (PS_1_Flow_Outlet [0])
  7. Hi, I cant get the date to work when logging alarms to database im using mariadb mysql this is what i get 0000-00-00 test Test;Test; 4 F with the logging sets i have set Custom Time Formatting to %Y%m%d%H%M%S , but i cant do that with alarms. -- -- Table structure for table `alarmlog` -- CREATE TABLE `alarmlog` ( `TheTime` date DEFAULT NULL, `Name` text DEFAULT NULL, `Description` text DEFAULT NULL, `Priority` tinytext DEFAULT NULL, `Status` tinytext DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; COMMIT;
  8. 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.
  9. I have a chart with expression HV_Power_Active [0, 3000] on the runtime copy
  10. 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
  11. 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?
  12. Sorry yes a remote copy runtime license
  13. 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?
  14. 1 other thing how would i make New values in Bold text semail.strBody = "New values: " + CRLF
  15. Ok this wont work either no email and daqfactory hangs private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 587 semail.strUserName = "xxxx" semail.strPassword = "xxxx" semail.strAuthenticate = "Auto" // open the file private.handle = File.Open("d:\DAQFactory\data.csv",1,0,0,0) // get the length private.length = File.GetLength(handle) // read the entire file and put into the body of the email email.strBody = File.Read(handle, length) // close the file file.Close(handle) semail.strReplyAddress = "xxxx" semail.strReplyName = "xxxxx" semail.strSubject = "xxxx" semail.strTo = "xxxxxx" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send()
  16. // open the file private.handle = File.Open("c:\mydata.csv",1,0,0,0) // get the length private.length = File.GetLength(handle) // read the entire file and put into the body of the email email.strBody = File.Read(handle, length) // close the file file.Close(handle) Found this on another thread i guess this would work? still would like to know if i can add more channels to an email direct
  17. Hi I'm using the below email script to send emails which is fine but i cant get more than 1 channel to show up in the email body. It will only show the last channel on the line? Do i have to set up an array? or another option is to save it to a file and send the file but i want it in the email body. private semail = new(CEMail) semail.strhost = "smtp.gmail.com" semail.port = 587 semail.strUserName = "xxxx" semail.strPassword = "xxxx" semail.strAuthenticate = "Auto" semail.strBody = "text " (HV_Power_Bulk_Fuel [0]) (Ventfan_Fan2_Vib_DE[0]) semail.strReplyAddress = "xxxx" semail.strReplyName = "xxxxx" semail.strSubject = "xxxx" semail.strTo = "xxxxxx" semail.strConnectionType = "STARTTLS" semail.strSSLProtocol = "TLSv1_2" semail.Send() Also another issue i dont seem to be able to send the average just sends the current value Mean(PS_2_Flow_Outlet[0,1600])
  18. Tried removing passwords still seems to be doing it. not sure what else to try. It works when i add the connection so its connecting and accessing data. But after save no good.
  19. ok i will give that a go once i get back to work.
  20. Yes i have password on both streams different passwords. Also yes they are both running 18.1
  21. yer comes up with invalid packets in the command window on DAQ every time i start. If i reset the connection it still wont work i have to delete the connection and add another.
  22. Also i have disabled the Firewall on the server to test that.