LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert String input to some controls

Hi,

 

I am using CRIO-9074. Host PC is sending string data to CRIO with UDP and i will take this data to control some instruments using IO modules of CRIO. With UDP host PC will send about 1000 byte data which belong to about 800 unit like lamps, analog indicators etc.

1 byte data will be used for lamp controls and

2 byte data will be used for analog indicators.

 

I am creating sub vi's for instruments. in the vi's i am using some input control datas which will come from host PC.

 

Critical point is there are too many data is coming from host PC and this data will be refresh every 125msecond. and i should make every calculations in these period.

 

I wrote a vi for input string comes from host PC and using this string i created the input controls for my sub vi's. but in the vi i used some array functions which takes some time but i dont want to spend time when new data come from host PC.

 

What is the good way for refresh the control values when new UDP data comes.

 

Thanks

Serdar

0 Kudos
Message 1 of 3
(2,539 Views)

Personally, I would just read the string and then use a Notifier or a Queue to send the string straight from the UDP to the different control loops.  The individual loops know where their data is in the string, so they can just parse the part(s) they need directly.  Searching an array is kind of expensive, so I would just hardcode the index and length to pull out in each loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,531 Views)

Duplicate thread: http://forums.ni.com/t5/Multifunction-DAQ/Convert-String-input-from-UDP-to-seperate-controls/m-p/291...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,486 Views)