NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
LeifS
Posts: 35
0 Kudos

User defined step for polling data

Hi,

I'm creating a User Defined VI to be called from SignalExpress, that needs to poll a serial device for data.

 

The serial device makes new data availiable in a register-array at a rate of 10Hz, and uses an additional register as a "message ID" to indicate when new data is availiable.

This means that my VI needs to poll this MessageID, and when it increments, I can read the register array into a waveform and return it to SignalExpress.

 

Now, what is the best/correct way of writing this VI in regard to the polling wait time?

I see two options here for the case when my VI is called and it detects that no new message is availiable:

  1. It immediately returns to SignalExpress ("non blocking").
    In this case, should I return an empty waveform or the previous waveform?
    (I do not want duplicated data logged in SignalExpress)
  2. It blocks the SignalExpress loop where the user defined step is placed, by waiting in my VI until a new message arrives, and then returns this new data in a waveform.

My user defined step is placed in a separate loop in signal express so the blocking in case 2 should not affect other DAQ loops in my SignalExpress project, right?

 

/LeifS

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page