Jump to content

Position value received from DAQ needs to be used to fire an event.


Recommended Posts

I am receiving encoder position values from a DAQ Assistant. After either of the positions DTP or NGTP are greater than a particular value I need to fire an event. The problem is the while loop to acquire the position from the encoders is running in parallel with the main while loop for all the events. This is to enable constant updation of the position values. Below attached, is a diagram of the DAQ Assitant while loop.

 

I tried creating an indicator and used value signalling but it did not work. I also tried using a control (button), but with the parallel loops it doesnt fire the required event. I changed it so that I have the event loop for the button inside the encoder while loop, but that just froze the while loop. I could not see any change in the position information from the encoders even when the drive was moving (information received from the drive via Profibus : this is running in a parallel while loop).

 

Any ideas as to how to solve this?

  

Below I have also attached the code for the main panel. 

 

post-52449-0-28420100-1405499896_thumb.j

MAIN PANEL.vi

Link to comment

Have you verified that you are getting the Boolean indicator from your loop that is running the DAQ assistant when the positions are reached?  How often does your position need to be update?  You have a loop that free running somewhat.

 

Is the DAQ assistant collecting from all 4 channels you have set?  If so is this coming out on one array?  Or is this getting data from one channel?  I'm not that familiar with using the DAQ assistant.

 

Does a value change event occur when the control is changed via a local variable?  I'll check that a bit later.

 

Joe

Link to comment

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.

×
×
  • Create New...

Important Information

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