Triggering an event with specific sting received via RS232

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
User avatar
tanlipseong
Posts: 31
Joined: Thu Aug 27, 2009 3:11 pm
Location: Malaysia
Contact:

Triggering an event with specific sting received via RS232

Post by tanlipseong »

Hi Benj

In Flowcode V4 section there is a thread with the same Subject, because i use Flowcode3, i post my quention here.

I try to convert the attachment "StringComp.fcf" to Flowcode3 but can not compile with below error, also attached with flowcode3 program.

please help: -


File name: D:\TANLS\FlowCode V3\FlowCode Program\RS232\Communication with PC\StringComp (Flowcode3).c
Generated by: Flowcode v3.6.11.53
Date: Wednesday, November 18, 2009 11:34:18
Licence: Professional
Registered to: Tan Incoils

http://www.matrixmultimedia.com

Launching the compiler...

C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic16.flowcode.exe -v -t PIC16F887 "StringComp (Flowcode3).c"

BoostC Optimizing C Compiler Version 6.70 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2007 Pavel Baranov
Copyright(C) 2004-2007 David Hobday

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited

StringComp (Flowcode3).c
Starting preprocessor: "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" "D:\TANLS\FlowCode V3\FlowCode Program\RS232\Communication with PC\StringComp (Flowcode3).c" -i "C:\Program Files\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC16F887 -la -c2 -o "StringComp (Flowcode3).pp" -v -d _BOOSTC -d _PIC16

.

D:\TANLS\FlowCode V3\FlowCode Program\RS232\Communication with PC\StringComp (Flowcode3).c(684): error: missing right paren
D:\TANLS\FlowCode V3\FlowCode Program\RS232\Communication with PC\StringComp (Flowcode3).c(628): error: failure

failure

..............
Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED
Attachments
StringComp (Flowcode3).fcf
(7 KiB) Downloaded 431 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Triggering an event with specific sting received via RS232

Post by Benj »

Hello

I think I have spotted the reason for the problem.

You are trying to compare two string variables using a decision icon. Unfortunatley the decision icon cannot do this functionality.

First you will have to use a byte variable and a string manipulation icon. In the string manipulation properties click the functions button, select compare and click use function.

You then need to add your variables.

eg
bytevar = Compare$(in_string, Str1, 0)
or
bytevar = Compare$(in_string, Str1, 1)

The 0 is case sensitive and the 1 is case insensivite.

Then you can use the decision icon on the byte variable. If the byte is equal to 0 then you have a match.

Post Reply