Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Bug Reports
 PowerHome Messageboard : PowerHome Bug Reports
Subject Topic: ph32.dll error Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
phil13
Groupie
Groupie
Avatar

Joined: December 19 2004
Location: France
Online Status: Offline
Posts: 60
Posted: December 27 2004 at 03:17 | IP Logged Quote phil13

Hi,

Is someone can help me to correct my macro because i've a critical error in ph32.dll with it ?

insert into macroheader values ('ALARM COM2 IN','COM2 IN',0,0,1);
insert into macrodetail values ('ALARM COM2 IN',1,26,'',NULL,'suivant',0);
insert into macrodetail values ('ALARM COM2 IN',2,16,'',NULL,'if (ph_combuffercount(1)=0,99,1)',0);
insert into macrodetail values ('ALARM COM2 IN',3,37,'',NULL,'lecture de caractere suivant ',0);
insert into macrodetail values ('ALARM COM2 IN',4,15,'[LOCAL1]',NULL,'ph_comrecvstring(1,1)',0);
insert into macrodetail values ('ALARM COM2 IN',5,16,'',NULL,'if (''[LOCAL1]''="#",1,6)',0);
insert into macrodetail values ('ALARM COM2 IN',6,37,'',NULL,'caractere debut message - si buffer non vide, erreur format',0);
insert into macrodetail values ('ALARM COM2 IN',7,16,'',NULL,'if (''{COM2 DATA IN}''="",1,2)',0);
insert into macrodetail values ('ALARM COM2 IN',8,36,'',NULL,'"Alarme IN - Erreur reception : " + ''[LOCAL1]''',0);
insert into macrodetail values ('ALARM COM2 IN',9,10,'COM2 DATA IN',NULL,'''[LOCAL1]''',0);
insert into macrodetail values ('ALARM COM2 IN',10,27,'',NULL,'"suivant"',0);
insert into macrodetail values ('ALARM COM2 IN',11,37,'',NULL,'autre caractere - on stocke',0);
insert into macrodetail values ('ALARM COM2 IN',12,10,'COM2 DATA IN',NULL,'''{COM2 DATA IN}'' + ''[LOCAL1]''',0);
insert into macrodetail values ('ALARM COM2 IN',13,16,'',NULL,'if (''[LOCAL1]''="%",2,1)',0);
insert into macrodetail values ('ALARM COM2 IN',14,27,'',NULL,'"suivant"',0);
insert into macrodetail values ('ALARM COM2 IN',15,37,'',NULL,'"detection caractere de fin"',0);
insert into macrodetail values ('ALARM COM2 IN',16,36,'',NULL,'"Alarme IN : " + ''[LOCAL1]''',0);
insert into macrodetail values ('ALARM COM2 IN',17,37,'',NULL,'traitement commande recue',0);
insert into macrodetail values ('ALARM COM2 IN',18,15,'[LOCAL2]',NULL,'{COM2 DATA IN}',0);
insert into macrodetail values ('ALARM COM2 IN',19,27,'',NULL,'left("[LOCAL2]",2)',1);
insert into macrodetail values ('ALARM COM2 IN',20,26,'',NULL,'fincmde',0);
insert into macrodetail values ('ALARM COM2 IN',21,10,'COM2 DATA IN',NULL,'""',0);

This macro is called on character reception on port2.
The port is open with : ph_comopen(1,2,38400,"N",8,1,1,0,0,1,0,0,0,"?","ALARM COM2 IN").

I can send data without problem.

If a character is detect on com2, the macro is normally called but i've the critical error inside it.

If i replace the macro by only a msgbox + exit, all works.

Before posting this message, i've tried a lot of things but it is very hard to test because each time i've this error, my computer is completly blocked ...
I must force my computer to switch off and i must reboot it before trying other thing ...

I run under windows me.

I thing i've probably done an syntax error.

Sorry for the french inside the macro ...

Philippe
Back to Top View phil13's Profile Search for other posts by phil13
 
phil13
Groupie
Groupie
Avatar

Joined: December 19 2004
Location: France
Online Status: Offline
Posts: 60
Posted: December 28 2004 at 02:54 | IP Logged Quote phil13

Dave,

i understand nothing ...

I've continue to search by using "skip" option in the macro and i've discovered the problem came from the following line :

insert into macrodetail values ('ALARM COM2 IN',12,10,'COM2 DATA IN',NULL,'''{COM2 DATA IN}'' + ''[LOCAL1]''',0);

=

set global {ALARM COM2 IN} = '{ALARM COM2 IN}' + '[LOCAL1]'

I've write again exactly the same line and now i've no problem !!

Otherwise, i've copied the database on a computer with XP and i had no problem even before rewrite the line.

Back to Top View phil13's Profile Search for other posts by phil13
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 28 2004 at 17:26 | IP Logged Quote dhoward

Philippe,

I imported your macro (I see you found how to export macros ) and looked through the code but could see no immediate problem. You say you've typed the same line in and now the problem is gone. If it's intermittent, then it may possibly be related to the data coming in from the serial port.

What concerns me mainly, is that the critical error showed up in ph32.dll. I could see no code in your macro where a call would have been made to ph32.dll. Is it possible to post a copy of the critical error?

Also, if I understand you correctly, the problem is now gone?

Let me know if this is still a problem and I'll see what I can do to help.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum