PE 6.0.8.8 Flowchart multi-task problem?

Dartmoor

Member
It's probably me, but here goes:
Using 08M2 with AXE021 Proto Board.
Two loops 'Main' & 'Start1'.

When trying to simulate the flowchart, I get the following error message:
"Syntax error on line 80 at/before position 5 - Error: setfreq not allowed in multi task program".

I guess the setfreq is done automatically by choosing the Start1?

Thanks,
Dave
 

Dartmoor

Member
Yes, the error message tells me that I cannot set feq.
Thing is I have not tried to set freq in the flowchart, it only appears in the basic conversion.
I can only assume that PE6 applies "set default freq" automatically?
Will post program tomorrow am.

I can edit the basic, but I cannot see a way to continue using the flowchart?
 

hippy

Technical Support
Staff member
It sounds like you are using a flowchart cell which needs to set the frequency to achieve what it wants to do, but being a multi-tasking program is not able to do that.

When you post your flowchart program we will be able to see if that is the issue.
 

Dartmoor

Member
Hippy is right.
I have used "Ultra" in the flowchart which seems to temp set freq. (this is under "start1").
Not a problem now that I know why, as I can find another way.
Thanks for your help guys!

Code:
'BASIC converted from flowchart:
'D:\Users\Dave\Documents\Picaxe\Ultrasonic\Ultra Signal Morton Rd 1.plf
'Converted  2016-05-14 at 21:49:36

{ ;Symbols
symbol varA = b0
symbol varB = b1
symbol varC = b2
symbol varD = b3
symbol varE = b4
symbol varF = b5
symbol varG = b6
symbol varH = b7
symbol varI = b8
symbol varJ = b9
symbol varK = b10
symbol varL = b11
symbol varM = b12
symbol varN = b13
symbol varO = b14
symbol varP = b15
symbol varQ = b16
symbol varR = b17
symbol varS = b18
symbol varT = b19
symbol varU = b20
symbol varV = b21
symbol varTEMPBYTE1 = b22
symbol varTEMPBYTE2 = b23
symbol varTEMPBYTE3 = b24
symbol varTEMPBYTE4 = b25
symbol varTEMPBYTE5 = b26
symbol varTEMPBYTE6 = b27
symbol varTEMPWORD1 = w11
symbol varTEMPWORD2 = w12
symbol varTEMPWORD3 = w13
}


main:

	pause 2000
Cell_7_5:
	pause 1000
	if varA < 100 then
		goto Cell_7_9
	end if
Cell_10_4:
	let varB = varA    
	goto Cell_7_5

Cell_7_9:
	if varA < varB then
		goto Cell_7_10
	end if
	goto Cell_10_4

Cell_7_10:
	inc varC
	if varC > 1 then
		goto Cell_7_12
	end if
	goto Cell_10_4

Cell_7_12:
	let varC = 0    
	servo C.2, 75
	pause 9000
	servo C.2, 126
	goto Cell_10_4

start1:

Cell_16_4:
	pause 100
	setfreq m4
	pulsout C.1, 2
	pulsin C.1, 1, varTEMPWORD1
	pause 10
	setfreq mDefault
	varTEMPWORD1 = varTEMPWORD1 * 10 / 58
	if varTEMPBYTE2 = 0 then
		let varA = varTEMPBYTE1
	else
		let varA = 255
	endif
	goto Cell_16_4


#no_data	'reduce download time
 
Top