LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating a CIN file

hello;
i am trying to communicate with serial port on labview. So i am using visa, but in same time i have to process some movement codes. It makes my system so slow. And i saw about CINs at this forum. I think if i write my communication vi into a CIN it will be faster. But I couldn't change my VI into a CIN. It  will so useful  if can someone help me.
 thanks.
0 Kudos
Message 1 of 5
(2,329 Views)

you have a race condition

try to using a 1ms delay inside the while loop

Message Edited by James R on 04-03-2007 12:39 PM

- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 2 of 5
(2,321 Views)
You've got nothing there that would even remotely justify rewriting it in C and using a CIN or Call Library Function Node. LabVIEW is compiled so I don't see why you would think you would gain any speed. That doesn't mean that you can't clean up the code a bit lit in the attachment. You don't mention what you are doing to process the data. Maybe if you attached that, someone could look to see how that could be improved.
0 Kudos
Message 3 of 5
(2,315 Views)
I have tried the way that you write.  However, it didn't increase the speed of my system as  I need. In my new vi, I tried to attach connection vi to  motion vi. I request you to look at my new vi and i really need your advise.

I attached 27.vi  i tried this vi to connectin but it didn't communicate to drive. it gives error (device not found and external code not present).
what is bug in this vi.


Download All
0 Kudos
Message 4 of 5
(2,275 Views)

Where did you even get the old serial functions in 27.VI? They haven't been pn any LabVIEW palette for quite a while. You are also using them incorrectly unless you want to connect to Com2. These obsolete functions start the port numbering with 0 (i.e. Com1).

Your connection drive should work and should be the one you are using. If you call this as a subVI, then do not do an VISA Configure Serial Port or VISA Close in the subVI. These belong in the top level main VI. If you don't get any timeout errors from this VI, it's likely that it's the serial instrument itself that is the bottelneck.

And why don't you clean up your connection drive VI like I showed you?

0 Kudos
Message 5 of 5
(2,269 Views)