LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I insert code that generates the color the subject will be using to do a test into an existing vi?

 

How can I insert code that generates a 3 second preview of the color the subject will be using to do a test into an existing vi?

 

This is for a reaction time study. I have an existing vi written that shows 16 small blocks on the screen. When the vi starts, all blocks turn white for 2 seconds, then the colour (Red, Yellow, Blue) is shown for a queue, then the subject performs the task (pushes 4 buttons in a pattern according to colour) based on the colour just flashed. I need to show the colour the subject will be using to do the upcoming set pattern of button pushes for say 3 seconds before the blocks turn white as preview. These trials can be done in blocks (serial) - so all red then yellow then blue - or random pattern of red, yellow, blue.

 

The code uses a case structure to determine block colours and has Case 0-3 (0 as default) white, then 1-3 as red, yellow, blue.

 

I attached the vi - the program is used on an IBM Thinkpad running Win98 (works great), but I had to dump the vi onto my laptop with Labview 10 (reason for broken vi)

 

 

Really would like some i

See attached 

 

0 Kudos
Message 1 of 19
(2,640 Views)

Here is the vi and images - sorry. The program is on an IBM Thinkpad running Win98 (works great). I had to move the vi to my laptop (Labview 9 Service pack1) - reason for broken vi

 

Thanks!

Download All
0 Kudos
Message 2 of 19
(2,640 Views)

get_data.vi is missing...

 

Concerning your VI...  well...  you're saying that it worked well with an older version of LabVIEW?

 

You should consider using a State Machine instead of the Stacked Sequence Structure..  But if it used to work...  it should still work.  At first glance, I did not see anything the LV2009 would break the code..

 

Can you post get_data.vi?

0 Kudos
Message 3 of 19
(2,624 Views)

Hey ray

 

Thks for the response. The intial program was written in Labview 6 and used maybe 8 yrs ago. I will send opening vi and get_data.vi. Anyway, Dr Kruisselbrink wants to flash the upcoming colour up in the blocks for the subject for say 3 seconds before transition to white then the actual colour being used for the trial. That's it. I have an idea but thought I would use the Forum. I had a major problem solved on here last Fall/2010 and thought it might be useful.

 

I attached a more of the working programs files. Merlin is the exe. Set_sequence exe is where we set the colour/button push patterns.

 

The study: the subject studies the various patterns tied to each colour. When trials are done they will be in blocks - do all red or yellow or blue. Or in random -  do a red do a yellow etc...they try and hit the buttons (for the colour) as fast as they can. They do not get to study the patterns again after initial study period. The PHd wants the subject to have a colour queue flashed up for the upcoming colour, wether it is a random or blocks, before just the subject is going to hit the buttons. The buttons are pushed A, B, C and D in that order, all the time for all colours. The arrangement (on the grid of 16 buttons) of A, B, C and D are all different patterns for red, yellow and blue.

 

 

 

 

 

Download All
0 Kudos
Message 4 of 19
(2,610 Views)

more files Ray

Download All
0 Kudos
Message 5 of 19
(2,609 Views)

more files Ray

Download All
0 Kudos
Message 6 of 19
(2,607 Views)

The probable reason for the broken arrow is that the get_data.vi uses the old traditional DAQ.  I do not know if it is still available, but unless you went out of your way to install it, the newer computer likely does not have it.  Does it search for DIO Port Convig.vi and DIO Port Read.vi? Does it find them?

 

Lynn

0 Kudos
Message 7 of 19
(2,597 Views)

Hey

 

The prgram works great on the IBM Thinkpad Win98 Labview ver 6.

 

I need to make the change to the existing code. Right now at the beginning of each trial (in practice mode), the blocks go white, then red etc....I need the blocks to show the upcoming colour (red, yellow or blue) for 3 seconds - then go white, then red or whatever colour it is if random. I do not want to rewrite the program. Just insert this updated code.

 

 

I took the vi's from the IBM Thinkpad Win98 via a Floppy Disc. I emailed the vi's from my Laptop WinXP, I have Labview version 9.0f2 (32-bit).  

0 Kudos
Message 8 of 19
(2,591 Views)

You need to install traditional DAQ support on your new PC.

 

Traditional DAQ 7.4.4 is still supported for LabVIEW 2009 so you could install that and your program should still work. As far as hardware compatibility, this page will tell you that information: http://zone.ni.com/devzone/cda/tut/p/id/6909.

 

By the way, do you know which DAQ device that you are using?  Did you install a new DAQ device in the new computer?  The Thinkpad is also a laptop, right?  So was it a USB DAQ device? (did they have traditional USB DAQ devices??)

 

Although the VI would not have a broken array, it may not mean that the software will work without a DAQ device.

0 Kudos
Message 9 of 19
(2,586 Views)

If you have the drivers CD or the LV 6 installation CD, then you could try installing just the traditional DAQ drivers.  I will do a search if I can find them...Good news, I found the drivers that you may need.  Here is the link to download.

 

After you install it, look in the vi.lib folder for the DAQ folder and see if you have a dozen .llb files. That is where you will find your missing vi's. You may also check into the LV2009 folder to check to see if the driver got installed there. I think the driver only gets installed for a single version and it might default to the latest at that time (I did not check which one it was).

 

In any case, look for the missing VIs in the \National Instruments\LabVIEW 2009\vi.lib\Daq\ folder.  The VIs are contained in the .llb files so you can't just search for them through Windows.  Look in the AI.llb file using LabVIEW.

 

 

 

Here are issues that you may encounter.  The link is to the DAQmx driver (I thought it was for traditional DAQ 😞 )

http://forums.ni.com/t5/LabVIEW/Error-10461-10008-DIO-Port-Config-Legacy-lvdaq-dll/m-p/947104

 

Someone with a similar problem.  It won't help you, but kinda explains what you are going through..

http://forums.ni.com/t5/LabVIEW/Since-upgrading-labview-many-sub-vi-s-such-as-DIO-Port-Config-vi/m-p...

 

Although the recommendation in this thread is to use the same LV version and driver as the previous machine, we know it is not your case.  Newer LV version... and maybe the latest Traditional DAQ drivers...  May be worth reading:

http://forums.ni.com/t5/LabVIEW/An-error-occurred-loading-VI-AI-Group-Config-vi/m-p/734547

 

 

 

Traditional DAQ 7.4.4

http://digital.ni.com/softlib.nsf/websearch/E42B7A3564AB2F1A862572A7006D1564?OpenDocument

 

0 Kudos
Message 10 of 19
(2,582 Views)