08-02-2011 08:17 AM
Thank you smercurio_fc for your advise but we have already tryed it but, unfortunately, with the custom led NewWorldMan has done the set the blinking property on true doesn't work.
08-02-2011 08:28 AM
NewWorldMan ha scritto:
Thank you for that, just one more thing. I've tried modifying the block diagram to get left and right indicators to flash instead of the highbeam and temperature indicators.
But for some reason they will not flash, they turn on and turn off as I tell them via the serial connection.
I've obviously missed something in the block diagram, but can't find it.
I created local variables for the left and right indicators and replaced the Temp and Highbeam ones with those in the inner case structure in the top loop.
I created 'constant's from the 'blinking' cluster in the top loop to use outside the lower loop.
I've checked your last code and if you'd rather use a string control then the COM read function have the byte buffer the code work properly, so your problem now is when you read the buffer from the COM port. May you are redind too fast to have some data or you didn't configure the port properly.
Try your code with a string control and check your com strem. Let me know if I'm right.
08-02-2011 08:37 AM - edited 08-02-2011 08:41 AM
g_Ricky ha scritto:
I've checked your last code and if you'd rather use a string control then the COM read function have the byte buffer the code work properly, so your problem now is when you read the buffer from the COM port. May you are redind too fast to have some data or you didn't configure the port properly.
I'm sorry, it's not clear for me too. What I mean is, instead to use the COM read function, use a string control where you can type the byte string to check your code such as I've done. You will see that the the blinking piece of code is working properly. So, the problem is on the COM read function which may doesn't read properly the string byte buffer.
To troubleshoot this problem you have to check if there is some byte to read on the port, if the port is configured properly and if you are not too fast to read the byte.
I'm sorry again for my bad English.
08-02-2011 08:52 AM - edited 08-02-2011 08:53 AM
The upper loop can be simplified to eliminate all that array building stuff. Also, to make the simulation run smoother, the string control should be cleared after it gets read so that it behaves similar to a VISA Read.
08-02-2011 09:01 AM
smercurio_fc ha scritto:
The upper loop can be simplified to eliminate all that array building stuff. Also, to make the simulation run smoother, the string control should be cleared after it gets read so that it behaves similar to a VISA Read.
Yes, you are right. Your code is better than mine, it is clearer and easier to understand than the code I have written.
It was helpful for me too.
Thank you for your support.
08-03-2011 04:30 AM
Thanks Guys,
Really pleased with that.
08-03-2011 04:33 AM
Not at all...
Anyway Kudos are welcome!! ![]()