moamed

MrPLC Member
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About moamed

  • Rank
    Newbie

Profile Information

  • Country Egypt
  1. Hi everybody I'm sorry for annoying you  but I have a question and hope you can help me I using read_var in unity pro software and connect to 9 devices I want away or a bit to indicate statue of communication to show in HMI to make an Alarm in case of lost connection with any device.   I try to use communication report of Management parameters and make an IF statement to compare it's value to zero and if it remain to Zero for 2 seconds it mean connection OK, and if communication report value change to any value except Zero it main connection fail. but it doesn't work well.  any suggestions please.
  2. Hi rajsiyer 
    I'm sorry for annoying you 
    but I have a question and hope you can help me
    I using read_var in unity pro software and connect to 9 devices
    I want away or a bit to indicate statue of communication to show in HMI to make an Alarm in case of lost connection with any device.  

    I try to use communication report of Management parameters and make an IF statement to compare it's value to zero and if it remain to Zero for 2 seconds it mean connection OK, and if communication report value change to any value except Zero it main connection fail.

    but it doesn't work well. 

    any suggestions please.

     

  3. Hello I tray to get way to delete data from table in SQL using Vijeo Citec v7.4 I write this Cicode but i didn't work any help please {{ FUNCTION Report_delete () INT hSQL; INT dSQL; hSQL = SQLConnect("DSN=Abdelwahed"); dSQL="DELETE FROM June WHERE date = 'Thursday, June 16, 2016'" ; SQLBeginTran(hSQL); SQLExec(hSQL,dSQL); END }}
  4. it work this the final code {{FUNCTION Report_time()INT hSQL;INT result_Report;STRING sssdate;STRING ssstime;STRING ssslevel11;STRING ssslevel21;STRING ssslevel31;STRING ssslevel41;STRING ssslevel;//sssdate = Date();sssdate =TimeToStr(TimeCurrent(),1);ssstime =TimeToStr(TimeCurrent(),3);ssslevel11=level1;ssslevel21=level2;ssslevel31=level3;ssslevel41=level4;ssslevel =level;hSQL = SQLConnect("DSN=Abdelwahed");result_Report = SQLExec(hSQL, "INSERT INTO level_time_2 (time,date,level1, level2,level3, level4, Final_level)VALUES ('" + sssdate + "','" + ssstime + "','" + ssslevel11 + "', '" + ssslevel21 + "','" + ssslevel31 + "','" + ssslevel41 + "','" + ssslevel + "')");SQLDisconnect(hSQL);END}}to move new line to table i create push button and write in it's input command function name -> Report_time()every time i press the push button new line create in table with new valueslast thing i want to do instead of this push button i need to use trigger certain variable when it's value change from 0 to 1 new line create in table with new values  
  5. Hi Guys  I tray to write Cicode that send data from Vijeo citect to SQL Automatic or i mean By triger this is the code but it didn't work  Please any one can help me {{ FUNCTION excel() INT hSQL; STRING sSQL; IF report_Triger=1 THEN hSQL = SQLConnect("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ias;Data Source=ABDELWAHED-PC\WINCC"); SQLExec(hSQL, sSQL); sSQL = "INSERT INTO dbo.test1 (level1,level2, level3,level4,Final_level)                VALUES("level1","level2","level3","level4","level")"; END END }}
  6. thanks cHud for your replay  the problem solved  
  7. Hi Guys  I work in new project using Modicon PLC And i want to generate report after every batch ( using Vijeo citect 7.4) I saw video at youtube describe how to generate rtf report and I do exactly like he did but i didn't find the file or the rtf file on the computer this is the link of video  https://www.youtube.com/watch?v=-OGMxFNoT_o and i attache pic show simple of my work