![]() |
Creating a sheet at set times
Hi,
I was hoping someone could help with this,I have very little experience with excel but not unfamiliar with programming (mostly PLC programming).So here's my dilemma: I am importing data from a dde server (directsoft32 data server) into cells which works fine,I can create a macro to move the data to another sheet,but I need to move to 3 different sheets depending on the time. (8:00,4:00,12:00), and reset the counters in the plc. I aquire the data with: c3=dsdata|weightcell1!'v2001' c4=dsdata|weightcell2!'v2004' c5=dsdata|weightcell3!'v2007' c6=dsdata|weightcell4!'v2010' c6=dsdata|Cam1!'v1001' (Pass Counter) c8=dsdata|Cam1!'v1002' (Fail Counter) c9=dsdata|Cam2!'v1003' (Pass Counter) c10=dsdata|Cam2!'v1004' (Fail Counter) c11=dsdata|Cam3!'v1005' (Pass Counter) c12=dsdata|Cam3!'v1006' (Fail Counter) c13=dsdata|Cam1!'v1007' (Pass Counter) c14=dsdata|Cam1!'v1008' (Fail Counter) The "V"s are memory locations in the plc that I'm referencing. And to reset I use a macro: Sub Button1_Click() Channel = DDEInitiate ("Dsdata","weightcells") DDEPoke Channel,"V2001", 0 DDEPoke Channel,"V2002", 0 DDEPoke Channel,"V2003", 0 DDEPoke Channel,"V2004", 0 DDETerminate (Channel) Channel = DDEInitiate ("Dsdata","Cameras") DDEPoke Channel,"V1001", 0 DDEPoke Channel,"V1002", 0 DDEPoke Channel,"V1003", 0 DDEPoke Channel,"V1004", 0 DDEPoke Channel,"V1005", 0 DDEPoke Channel,"V1006", 0 DDEPoke Channel,"V1007", 0 DDEPoke Channel,"V1008", 0 DDETerminate (Channel) End Sub Any help would be greatly appreciated Thanks in advance Blue Skies Scott |
All times are GMT +1. The time now is 07:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com