Custom Code problem with v4 flowcode

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Custom Code problem with v4 flowcode

Post by lewisrendal »

Hi,

Anyone had any issues regarding custom codes.
I had a custom code done for me by Ben Rowland and have updated flowcode a few times since then, why when I place the custom code in flowcode directory I cannot see it ?

The current version of flowcode starts with "PIC" my custom code I had done just starts "custom" , tried using the "PIC" prefixing the name and flowcode would not even stay open, just shuts down when I try to use the custom code ??

Many Thanks

James

User avatar
Steve
Matrix Staff
Posts: 3424
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Custom Code problem with v4 flowcode

Post by Steve »

Sounds like there is a problem with the custom code file. Please post it here and we'll have a look.

lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Custom Code problem with v4 flowcode

Post by lewisrendal »

Hi Steve,

The custom code is attached.

I am running version 4.5.18.74 flowcode
Thanks
James
Attachments
Custom_Code.c
(19.89 KiB) Downloaded 216 times

User avatar
Steve
Matrix Staff
Posts: 3424
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Custom Code problem with v4 flowcode

Post by Steve »

The "start" tag for the <SetFlash> function is missing.

lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Custom Code problem with v4 flowcode

Post by lewisrendal »

Hi,

I can't read the "C" file details on the pc at home, I'm running win7, at work I can see the details on xp ?

Don't understand the "start tag" command ??

Cheers
James

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Re: Custom Code problem with v4 flowcode

Post by Mikat »

HI.

I thin Steve means that this

Code: Select all

/*Macro_SetFlash_End*/  //THIS IS WRONG!

	cs_enable(cs);
	command();

	send(0);
	send(0);
	send(0);
	send(0);
	send(1);
	send(0);
	send(0);

	if(flash)
		send(1);
	else
		send(0);

	send(0);

	cs_disable(cs);

/*Macro_SetFlash_End*/
Should be like this

Code: Select all

/*Macro_SetFlash_Start*/ //IT SHOULD BE LIKE THIS!

	cs_enable(cs);
	command();

	send(0);
	send(0);
	send(0);
	send(0);
	send(1);
	send(0);
	send(0);

	if(flash)
		send(1);
	else
		send(0);

	send(0);

	cs_disable(cs);

/*Macro_SetFlash_End*/
You can open the c file, like notepad, you just need to choose program notepad to open files at c, or even better download Notepad++...

Mika

lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Custom Code problem with v4 flowcode

Post by lewisrendal »

Hi,

Thanks for that, but when I use the custom code the program "flowcode v4" closes, use any other component and it works fine.

Same on the both computers !

Help

Regards
James

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Re: Custom Code problem with v4 flowcode

Post by Mikat »

Try this component...
Attachments
Custom_Code (1).c
(19.89 KiB) Downloaded 217 times

lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Custom Code problem with v4 flowcode

Post by lewisrendal »

Hi,

That works, what did you do ?

Best Regards
James :D

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Re: Custom Code problem with v4 flowcode

Post by Mikat »

Just change the one row which Steve say, the code is above...
So I change this:
/*Macro_SetFlash_End*/
.....
/*Macro_SetFlash_End*/
to that
/*Macro_SetFlash_Start*/
....
/*Macro_SetFlash_End*/
Mika

lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Custom Code problem with v4 flowcode

Post by lewisrendal »

Hi,

Yes I tried that but it would not work for me, and another thing the display is flashing all the time, the data is working and is displaying, just won't stop flashing ?? I have tried a few displays and they do the same, must be something else in the custom code or flowcode itself ??

Not sure really.

Thanks anyway
James

lewisrendal
Flowcode V4 User
Posts: 61
Joined: Tue Feb 01, 2011 7:21 pm
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Custom Code problem with v4 flowcode

Post by lewisrendal »

Hi,

Forget the last thread, the flash command is all part of the configuration after studying it.
In the original custom code it did work, but the flash command did not, now I know why, when the custom code was done for me by matrix they had the flash code incorrect on the "start" command.

All is working now and happy once again until the next problem !

Cheers for all the input

James :)

Post Reply