fumbler Posted March 30, 2005 Report Share Posted March 30, 2005 My application has to read or set various lines on a single 6025E digital I/O port independently. Individual VIs work fine but when they are in a Teststand sequence the digital I/O falls over because of the port configuration every time. I understand that it is best to put all the DIO in its own VI but I can't grasp how to pass references around between the VIs of the application. Could someone point me to some examples for 6.0i please? Thanks Pete Quote Link to comment
JackHamilton Posted March 30, 2005 Report Share Posted March 30, 2005 The way to do this is to write a single routine who's job in life is to set the DO port lines.The way to control this 'function' (Vi) is by using messaging... I've uploaded an example program that is pretty near what you want. Regards Jack Hamilton Download File:post-37-1112162564.llb Quote Link to comment
fumbler Posted March 31, 2005 Author Report Share Posted March 31, 2005 I've uploaded an example program that is pretty near what you want.Regards Jack Hamilton 4361[/snapback] Thanks Jack, but I can't open it as I only have 6.0i. regards Pete. Quote Link to comment
JackHamilton Posted March 31, 2005 Report Share Posted March 31, 2005 Ouch!, That's too far back for me to save. 6i queues were different then... :thumbdown: The diagram is a state machine - so it won't print out well. Hmmm.... Quote Link to comment
fumbler Posted April 1, 2005 Author Report Share Posted April 1, 2005 Ouch!,That's too far back for me to save. 6i queues were different then... :thumbdown: The diagram is a state machine - so it won't print out well. Hmmm.... 4396[/snapback] I got stuck into it today and got a working model with queues. It's a bit messy though. It _was_ really good being able to use channel names to enable portability between DAQ cards but the 6.0i Advanced port config VIs don't seem to recognise a channel list so I had to hard code channel assignments. Now I have to figure out some bitwise maths so that I can simply send a message asking for a single channel to alter. Pete Quote Link to comment
fumbler Posted April 4, 2005 Author Report Share Posted April 4, 2005 I got stuck into it today and got a working model with queues. It's a bit messy though. It _was_ really good being able to use channel names to enable portability between DAQ cards but the 6.0i Advanced port config VIs don't seem to recognise a channel list so I had to hard code channel assignments. Now I have to figure out some bitwise maths so that I can simply send a message asking for a single channel to alter. Pete 4407[/snapback] It was looking good. The queue handler fiddled the port bits and the Qcaller loaded a 2-byte cluster with portmask and desired state. But when I put the Qcaller in place of the 'Write to Digital Port.vi' it does not execute in a timely fashion. :headbang: What I _had_ was a working vi to capture the switch-on surge. I set up a conditional analogue capture, power up the device and read the analogue data. But with the queue implementation the device does not get powered on until the analogue read times out. How can I tweak the execution priority so that it does what I need? Pete Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.