Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File ******************************************************************************************************************* > Survey has radio buttons instead of item, how do i define the port signal for each question. What do you mean by "port signal for each question"? If you want to send a TTL trigger indicating the start of a given <surveypage>, you can do so via the page's /stimulusframes just like you do in regular <trial> elements. I.e. <surveypage siyazama1> / stimulusframes = [1=s1_ttl] ... </surveypage> with <port s1_ttl> ... </port> and so forth. "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. > "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. Then the approach outlined in my previous response should work. Thanks a lot, that was very helpful. On another note, how can I interpret error messages from Inquisit 4 Here are the last two port markers for sending trigger <port marker15> / items = ("00001111") / port = LPT1 / subport = data </port <port marker16> / items = ("00010000") / port = LPT1 / subport = data </port and whenever I run the experiment, it runs well but at the end I get the following error messages <port marker15> WARNING: Close tag '</port ' has invalid whitespace characters. WARNING: Close tag '</port <port' has invalid characters<port marker16> WARNING: Close tag '</port ' has invalid whitespace characters. WARNING: Close tag '</port ' has invalid characters.
What do the error messages mean, and how can I fix the code? Thanks in advance. The error messages tell you that the close tags in your <port> elements are broken. <port marker15> / items = ("00001111") / port = LPT1 / subport = data </portneeds to read <port marker15> / items = ("00001111") / port = LPT1 / subport = data </port>
|
|
|
Nothando Nkambule
|
|
Group: Forum Members
Posts: 21,
Visits: 51
|
+x+x+x+x+x+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File ******************************************************************************************************************* > Survey has radio buttons instead of item, how do i define the port signal for each question. What do you mean by "port signal for each question"? If you want to send a TTL trigger indicating the start of a given <surveypage>, you can do so via the page's /stimulusframes just like you do in regular <trial> elements. I.e. <surveypage siyazama1> / stimulusframes = [1=s1_ttl] ... </surveypage> with <port s1_ttl> ... </port> and so forth. "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. > "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. Then the approach outlined in my previous response should work. Thanks a lot, that was very helpful. On another note, how can I interpret error messages from Inquisit 4 Here are the last two port markers for sending trigger <port marker15> / items = ("00001111") / port = LPT1 / subport = data </port <port marker16> / items = ("00010000") / port = LPT1 / subport = data </port and whenever I run the experiment, it runs well but at the end I get the following error messages <port marker15> WARNING: Close tag '</port ' has invalid whitespace characters. WARNING: Close tag '</port <port' has invalid characters<port marker16> WARNING: Close tag '</port ' has invalid whitespace characters. WARNING: Close tag '</port ' has invalid characters.
What do the error messages mean, and how can I fix the code? Thanks in advance.
|
|
|
Nothando Nkambule
|
|
Group: Forum Members
Posts: 21,
Visits: 51
|
+x+x+x+x+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File ******************************************************************************************************************* > Survey has radio buttons instead of item, how do i define the port signal for each question. What do you mean by "port signal for each question"? If you want to send a TTL trigger indicating the start of a given <surveypage>, you can do so via the page's /stimulusframes just like you do in regular <trial> elements. I.e. <surveypage siyazama1> / stimulusframes = [1=s1_ttl] ... </surveypage> with <port s1_ttl> ... </port> and so forth. "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. > "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. Then the approach outlined in my previous response should work. Thanks a lot, that was very helpful.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+x+x+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File ******************************************************************************************************************* > Survey has radio buttons instead of item, how do i define the port signal for each question. What do you mean by "port signal for each question"? If you want to send a TTL trigger indicating the start of a given <surveypage>, you can do so via the page's /stimulusframes just like you do in regular <trial> elements. I.e. <surveypage siyazama1> / stimulusframes = [1=s1_ttl] ... </surveypage> with <port s1_ttl> ... </port> and so forth. "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. > "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question. Then the approach outlined in my previous response should work.
|
|
|
Nothando Nkambule
|
|
Group: Forum Members
Posts: 21,
Visits: 51
|
+x+x+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File ******************************************************************************************************************* > Survey has radio buttons instead of item, how do i define the port signal for each question. What do you mean by "port signal for each question"? If you want to send a TTL trigger indicating the start of a given <surveypage>, you can do so via the page's /stimulusframes just like you do in regular <trial> elements. I.e. <surveypage siyazama1> / stimulusframes = [1=s1_ttl] ... </surveypage> with <port s1_ttl> ... </port> and so forth. "port signal for each question" - I have set up my survey such that each page only contains one question, in hope that a trigger will be sent out for each question.
|
|
|
Nothando Nkambule
|
|
Group: Forum Members
Posts: 21,
Visits: 51
|
+x+x+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File ******************************************************************************************************************* > Survey has radio buttons instead of item, how do i define the port signal for each question. What do you mean by "port signal for each question"? If you want to send a TTL trigger indicating the start of a given <surveypage>, you can do so via the page's /stimulusframes just like you do in regular <trial> elements. I.e. <surveypage siyazama1> / stimulusframes = [1=s1_ttl] ... </surveypage> with <port s1_ttl> ... </port> and so forth. ok, I will try that, thank you very much
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File ******************************************************************************************************************* > Survey has radio buttons instead of item, how do i define the port signal for each question. What do you mean by "port signal for each question"? If you want to send a TTL trigger indicating the start of a given <surveypage>, you can do so via the page's /stimulusframes just like you do in regular <trial> elements. I.e. <surveypage siyazama1> / stimulusframes = [1=s1_ttl] ... </surveypage> with <port s1_ttl> ... </port> and so forth.
|
|
|
Nothando Nkambule
|
|
Group: Forum Members
Posts: 21,
Visits: 51
|
+x+x+x+x+x+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today. Ok, I followed the advise from the forum, and it worked. Thank you so much. However now I have another problem. How do I go about sending a TTL trigger for a survey using inquisit . Survey has radio buttons instead of item, how do i define the port signal for each question. In which section should i insert the codes for sending triggers for each question and how?Any form of assistance will be greatly appreciated. ******************************************************************************************************************* ******************************************************************************************************************* Cultural orientation questionnaire ******************************************************************************************************************* ******************************************************************************************************************* Editable Values ********************************************* *************************************************************************************** /pageinstructions:the instructions that appear at the top of each surveypage /quitinstructions:the instructions to quit the questionnaire Note: the quitcommand can be changed under DEFAULTS <values> /pageinstructions = "Please use the mouse to select the answers that apply best to you." /quitinstructions = "To quit the questionnaire at any time, press Alt+E " </values> ******************************************************************************************************************* ******************************************************************************************************************* ******************** Summary data ******************** date, time, subject:date and time script was run with the current subjectnumber script.elapsedtime:time it took to run script (in ms) /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <data> /file = " siyazama_summary.iqdat" /columns = [date, time, subject, script.elapsedtime, values.completed] /separatefiles = true </data> ******************************************************************************************************************* ******************************************************************************************************************* REMAINING CODE: Customize after careful consideration only ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* ******************************************************************************************************************* DEFAULTS: ******************************************************************************************************************* ******************************************************************************************************************* requires Inquisit 4.0.6.0 <defaults> /minimumversion = "4.0.6.0" / quitcommand = (Alt+18) </defaults> ******************************************************************************************************************* ******************************************************************************************************************* VALUES: automatically updated ******************************************************************************************************************* ******************************************************************************************************************* /completed:0 = script was not completed (script prematurely aborted); 1 = script was completed (all conditions run) <values> /completed = 0 </values> ******************************************************************************************************************* ******************************************************************************************************************* QUESTIONS ******************************************************************************************************************* ******************************************************************************************************************* <caption thankyou> /caption = "Thank you very much for your help." / fontstyle = ("Arial", 2.5%, true, true, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> <caption siyazama> /caption = "Scenario_Questionnaire" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /position = (70%, 95%) </caption> <radiobuttons q1_sex> /caption = "1. What is your sex?" / options = ("A. Female", "B. Male") /required = false /orientation = vertical </radiobuttons> <radiobuttons q2_bill> /caption = "2. You and your friends decided spontaneously to go out to diner at a restaurant. What do you think is the best way to handle the bill?" / options = ( "A. Split equally, without regard two who ordered what", "B. Split it according to how much each person makes", "C. The group leader pays the bill or decides how to split it", "D. Compute each person's charge according to what that person ordered") /required = false /orientation = vertical </radiobuttons> <radiobuttons q3_office_art> /caption = "3. You are buying a piece of art for your office. Which one factor is most important in deciding whether to buy it?" / options = ( "A. It is a good investment", "B. Your coworkers will like it", "C. You just like it", "D. Your superior will approve it") /required = false /orientation = vertical </radiobuttons> <radiobuttons q4_self_description> /caption = "4. Suppose you had to use one word to describe yourself. Which one would you use?" / options = ("A. Unique", "B. Competitive", "C. Cooperative", "D. Dutiful") /required = false /orientation = vertical </radiobuttons> <radiobuttons q5_happiness> /caption = "5. Happiness is attained by" / options = ("A. Gaining a lot of status in the community", "B. Linking with a lot of friendly people", "C. Keeping one's privacy", "D. Winning in competition") /required = false /orientation = vertical </radiobuttons> <radiobuttons q6_trip> /caption = "6. You are planning to take a major trip that is likely to inconvenience a lot of people at your place of work, during your absence. With whom will you discuss it, before deciding whether or not to take it?" / options = ("A. No one", "B. My parents", "C. My spouse or close friend", "D. Experts about the place I plan to travel to so I can decide if I want to go") /required = false /orientation = vertical </radiobuttons> <radiobuttons q7_books> /caption = "7. Which one of these four books appears to you to be the most interesting?" / options = ( "A. How to make friends", "B. How to succeed in business", "C. How to enjoy yourself inexpensively", "D. How to make sure you are meeting your obligations") /required = false /orientation = vertical </radiobuttons> <radiobuttons q8_employees> /caption = "8. Which is the most important factor in an employee's promotion, assuming that all other factors such as tenure and performance are equal? Employee is/has" / options = ( "A. Loyal to the corporation", "B. Obedient to the instructions from management", "C. Able to think for him- or herself", "D. Contributed to the corporation much in the past") /required = false /orientation = vertical </radiobuttons> <radiobuttons q9_outfit> /caption = "9. When you buy clothing for a major social event, you would be most satisfied if" / options = ( "A. You like it", "B. Your parents like it", "C. Your friends like it", "D. It is so elegant that it will dazzle everyone") /required = false /orientation = vertical </radiobuttons> <radiobuttons q10_budget> /caption = "10. In your opinion, in an ideal society, national budgets will be determined so that;" / options = ( "A. All people have adequate incomes to meet basic needs", "B. Some pole will be rewarded for making brilliant contributions" "C. There will be maximal stability, law, and order" "D. People can feel unique and self-actualized") /required = false /orientation = vertical </radiobuttons> <radiobuttons q11_self> /caption = "11. When people ask me about myself, I" / options = ( "A. Talk about my ancestors and their traditions", "B. Talk about my friends, and what we like to do", "C. Talk about my accomplishments", "D. Talk about what makes me unique") /required = false /orientation = vertical </radiobuttons> <radiobuttons q12_conflict> /caption = "12. Suppose your fiancé and your parents do not get along very well. What would you do?" / options = ( "A. Nothing", "B. Tell my fiancé that I need my parents' financial support and he or she should learn to handle the politics", "C. Remind my fiancé that he or she should make a grater effort to fit with the family.", "D. Remind my fiancé that my parents and family are very important to me and he or she should submit to their wishes") /required = false /orientation = vertical </radiobuttons> <radiobuttons q13_team> /caption = "13. Teams of five people entered a science project contest. Your team won first place and a prize of $100. You and another person did 95% of the work on this project. How should the money be distributed?" / options = ( "A. Split it equally, without regard to who did what", "B. The other person and I get 95% of the money and the rest goes to the group", "C. The group leader decides how to split the money", "D. Divide the money the way that gives me the most satisfaction") /required = false /orientation = vertical </radiobuttons> <radiobuttons q14_event> /caption = "14. Imagine you are selecting a band for a fund-raising event given by your organization. Which are the most important factors in making your decision?" / options = ( "A. I really like the band", "B. My friends approve of this band", "C. The administration of my organization approves of the band", "D. The band will draw a large crowd") /required = false /orientation = vertical </radiobuttons> <radiobuttons q15_class> /caption = "15. You need to choose one more class for next semester. Which one will you select?" / options = ( "A. The one that will help me get ahead of everyone else", "B. The one my parents said to take", "C. The one my friends plan to take", "D. The one that seems most interesting to me") /required = false /orientation = vertical </radiobuttons> <radiobuttons q16_pizza> /caption = "16. You are at a pizza restaurant with a group of friends. How should you decide what kind of pizza to order?" / options = ( "A. The leader of the group orders for everyone", "B. I order what I like", "C. We select the pizza that most people prefer", "D. We order a most extravagant pizza available") /required = false /orientation = vertical </radiobuttons> <radiobuttons q17_schoolpolitics> /caption = "17. Which candidate will you vote for in the election for president of the student government?" / options = ( "A. The one your friends are voting for", "B. The one I like best", "C. The one who will reward me personally", "D. The one who is a member of an organization important to me. The status of the organization will improve if that candidate is elected.") /required = false /orientation = vertical </radiobuttons> <caption end> /caption = "This is the end of the survey. Thank you very much for your help." / fontstyle = ("Arial", 2%, true, false, false, false, 5, 1) / txcolor = (0, 0, 0) </caption> ******************************************************************************************************************* ******************************************************************************************************************* SURVEYPAGES ******************************************************************************************************************* ******************************************************************************************************************* Note: original instructions; updated for computer usage <surveypage instructions> /caption ="Scenario Questionnaire" /subcaption = "The next couple of pages contain several scenarios.Each scenario is followed by four options. Please imagine yourself in those situations and choose the option you consider the best or most appropriate for you. Remember there are no correct answers, just your opinion of what is best." / fontstyle = ("Arial", 5%, true, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 2.5%, false, false, false, false, 5, 1) /questions = [1 = thankyou, siyazama] /showpagenumbers = false /showquestionnumbers = false </surveypage> <surveypage siyazama1> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q1_sex, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama2> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q2_bill, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama3> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q3_office_art,siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama4> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q4_self_description, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama5> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q5_happiness, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama6> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q6_trip, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama7> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q7_books, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama8> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q8_employees, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama9> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q9_outfit, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama10> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q10_budget, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama11> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q11_self, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama12> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q12_conflict, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama13> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q13_team, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama14> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q14_event, siyazama ] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama15> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q15_class, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama16> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q16_pizza, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> <surveypage siyazama17> /caption ="<%values.pageinstructions%>" /subcaption = "<%values.quitinstructions%>" / fontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /subcaptionfontstyle = ("Arial", 1.5%, false, false, false, false, 5, 1) /itemfontstyle = ("Arial", 3%, false, false, false, false, 5, 1) /responsefontstyle = ("Arial", 2%, false, false, false, false, 5, 1) / txcolor = (0, 0, 0) /questions = [1 = q17_schoolpolitics, siyazama] /showpagenumbers = false /showquestionnumbers = false /backbuttonposition = (30%, 90%) /nextbuttonposition = (50%, 90%) </surveypage> ******************************************************************************************************************* ******************************************************************************************************************* SURVEY ******************************************************************************************************************* ******************************************************************************************************************* Notes: - presents the surveypages <survey siyazama> /pages = [1 = instructions; 2 = siyazama1; 3 = siyazama2; 4 = siyazama3; 5 = siyazama4; 6 = siyazama5; 7 = siyazama6 ;8 = siyazama7; 9 = siyazama8; 10 = siyazama9; 11 = siyazama10; 12 = siyazama11; 13 = siyazama12 ; 14 = siyazama13; 15 = siyazama14; 16 = siyazama15; 17 = siyazama16 ] /screencapture = false </survey> ******************************************************************************************************************* ******************************************************************************************************************* SUMMARY: stores the summary variables to the datafile ******************************************************************************************************************* ******************************************************************************************************************* <trial summary> /recorddata = true /trialduration = 0 /ontrialend = [values.completed = 1] </trial> <block summary> /trials = [1 = summary] </block> ******************************************************************************************************************* ******************************************************************************************************************* EXPERIMENT ******************************************************************************************************************* ******************************************************************************************************************* <expt > /blocks = [1 = siyazama; 2 = summary] </expt> ******************************************************************************************************************* End of File *******************************************************************************************************************
|
|
|
Nothando Nkambule
|
|
Group: Forum Members
Posts: 21,
Visits: 51
|
+x+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial> Thank you, I will try the code today.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
+x+x+xI have been browsing through past posts in the forum, trying to look for an example of how I can write a code for sending a trigger to a parallel port for my EEG experiment. I am currently using picture IAT code from Inquisit library. Please help , if you have any idea of how to do this. Thanks. You set up <port> elements and "display" them like you would with any other kind of stimulus element (<text>, <picture>, etc.), i.e. add them to the various <trial> element's /stimulusframes or /stimulustimes attributes. This is script is a good example: https://www.millisecond.com/download/library/oddball/ Thank you, I have tried to follow the inquisit script but I am getting error messages <port attributeA> / port = LPT1 / subport = data / items = ("00000001") </port> <port attributeB> / port = LPT1 / subport = data / items = ("00000010") </port> <port targetA> / port = LPT1 / subport = data / items = ("00000011") </port> <port targetB> / items = ("00000001") / port = LPT1 / subport = control / erase = false </port> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets I can't say anything about error messages without knowing what exactly those error messages are. If they tell you that the port you specified cannot be found, adjust the port number accordingly, e.g. LPT2 instead of LPT1. You can test communication with your equipment via the port monitor: https://www.millisecond.com/support/docs/v4/html/howto/howtoportmonitor.htm Also see for more background: https://www.millisecond.com/support/docs/v4/html/howto/howtosendport.htm> I am also lost, in the sense that I don't have an idea of how to go about defining the port items for the two attributes and two targets Like any other stimulus element, <port> elements may have several items. You can pair different TTL signals to the different items in your attribute and target stimuli. See https://www.millisecond.com/support/docs/v4/html/howto/howtopairs.htmPairing a port stimulus' items to a <text> element's items works the same way as pairing two <text> elements. Finally, your <port> elements *must* have unique names. Elements of the same *class* may not have identical names. I.e., you cannot have <text attributeA> ... </text> and <port attributeA> ... </port> in the same script. A <trial> like <trial example> / stimulusframes = [1=attributeA] ... </trial> will have no way of knowing whether you want it to display the <text> element or the <port> element. You need to have something like <text attributeA> ... </text> and <port attributeAsignal> ... </port> with <trial example> / stimulusframes = [1=attributeA, attributeAsignal] ... </trial>
|
|
|