Jump to content
Sign in to follow this  
SdKfz10

LabVIEW VISA Serial VI

Recommended Posts

I have this VISA Serial VI which I have used for some time doing RS-232/485 communication. It works OK, but I am no Serial comm expert, so I'm not certain what flaws it may contain.

Are there any experts here who would like to have a look and maybe make some comments?

LabVIEW 8 attachment.

VISA Serial.llb

Share this post


Link to post
Share on other sites

Well. My "negative" comments are'nt so much about your code. More about the serial implementation of VISA. The fact that once you are in a "read" you are stuck until it times out (not even the vi stop button will have an effect) means that you are forced into checking bytes at port and re-implementing the timeout. This makes any serial vis far more complicated than they need to be (and incongruous with all other VISA interfaces). My "positive" comment would be "if it's not broke, don't fix it" and you have proven it works since you state that you have "used for some time". Therefore it's only a style thing if anyone is going to comment.

Anyhoo.

Up until recently (well a year or two ago). I too used the action engine approach also. I eventually split out the sub-frames into separate VIs and pulled them together in a plymorphic VI. This has a couple of minor advantages over the AE in that you can have different terminals for each action, different icons (if you so desire) and a nice little drop-down under the VI instead of a typdef (slight readability improvement IMHO). You could just wrap the current vi in some more VIs to achieve this rather than pulling out the frames as I did, but it was just a personal preference and brought the serial in-line with tcpip and others that I chose to go that route with.

Wrapping in a polymorphic VI at this level does have one disadvantage though. Since you cannot nest polymorphs, it means you cant wrap higher level protocol vis that use these into a polymorphic VI. It forces you to make protocol dependant serial transactions (e.g reads based on a byte length) an item in the drop-down at the same level (flattens the hierarchy and couples dependancy).

Share this post


Link to post
Share on other sites
I too used the action engine approach also. I eventually split out the sub-frames into separate VIs

You did what!?!

...Lol

Share this post


Link to post
Share on other sites

You did what!?!

...Lol

Not quite what you are probably thinking. I added serial to the transport.lvlib. So I didn't exactly produce a polymorphic VI directly from the serial frames of the AE, but to all intents and purposes it is the same.

Share this post


Link to post
Share on other sites
Not quite what you are probably thinking...

I'll take any opportunity to razz you up :P

Share this post


Link to post
Share on other sites

Is that a euphemism? :D

Ha! Looks like more like language barrier issues.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.