My application is actually centered around using the mbed with LabView, so these programs are actually somewhat helpful although I found them a bit late. It's a nice start, but here's some recommendations if you want to make it a bit more robust.
The program runs, however it will throw an error if you attempt to read from the serial port when no message is available yet. This occurs in mbed.vi and mbed-read.vi . I would prefer if the VI had a boolean "timeout occured" output or simply raised a flag to indicate whether a message is initially available. If you use the Bytes at Port VI first to check how many bytes are available to read you can avoid this timeout error.
I like that you are creating self-contained read and write programs. For good conventions, put the inputs on the left side of the VI icon and outputs on the right. Document the suckers - the context help is really helpful in Labview so include information for that.
In mbed-write.vi you really ought to check for a number with "Equal to Zero" instead of "Not Equal to Zero" or better yet use some "Not"s on the other checks for empty inputs to make it consistant and easier for people to read.
You never close the serial VISA, which means that other applications will not be able to access the serial port. It might make sense for you to create seperate initialization and closing programs if you don't want to open and close the port between every read and write.
The mbed itself communicates via serial by using putc and printf. It would make a certain amount of sense to include LabVIEW functions that match these, like a getc and scanf function. At the very least, you should probably allow the user to specify the termination character for the read function.
If you need any more help I can be of assistance.
Jimmy
Hi,
Do we have any LabView users around? We're putting together some building blocks to help mbed and LabView work together, and would be interested in some testers/feedback. Please shout here, or send me a personal message via my profile if you'd rather talk direct.
Thanks!
Simon