PulsePalGUI in MatLab

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PulsePalGUI in MatLab
#1
Hello,

I am having some new problems trying to connect to the Pulse Pal GUI through MatLab it had worked correctly on January 24, 2017.

[Image: BYLQNTI]

It must have updated through SourceTree at some point recently as some of the text is new to me: "Connecting with MATLAB/Java serial interface (high latency).

There is also now an error when I try to disconnect the PulsePal from MatLab.
[Image: dIACBye]


Thank you for your help!
Reply
#2
I don't think that SourceTree could have changed anything - the Pulse Pal master and beta repositories haven't been updated since fall of 2016.

If you're seeing the message about Java, it looks like PsychToolbox wasn't detected.
As a first troubleshooting step, try reinstalling PsychToolbox, following the instructions here.

The error when computing voltage step is likely a firmware mismatch - the firmware expects bytes that are different from what the currently installed MATLAB software is sending it. Try updating the firmware using the file in /PulsePal/Firmware/. If you're using the Gen2 MATLAB software on the beta branch, use PulsePal_2_0_1. For the master branch, use PulsePal_2_0_0.

Which OS and MATLAB / Octave versions are you using?
Reply
#3
(02-11-2017, 05:06 PM)Josh Wrote: I don't think that SourceTree could have changed anything - the Pulse Pal master and beta repositories haven't been updated since fall of 2016.

If you're seeing the message about Java, it looks like PsychToolbox wasn't detected.
As a first troubleshooting step, try reinstalling PsychToolbox, following the instructions here.

The error when computing voltage step is likely a firmware mismatch - the firmware expects bytes that are different from what the currently installed MATLAB software is sending it. Try updating the firmware using the file in /PulsePal/Firmware/. If you're using the Gen2 MATLAB software on the beta branch, use PulsePal_2_0_1. For the master branch, use PulsePal_2_0_0.

Which OS and MATLAB / Octave versions are you using?

Thank you for your reply! I will try those steps.

I'm using Windows 10 and MATLAB 2016a. I'm not sure what could have happened since nothing has changed since I last used it and it worked fine. Perhaps Windows did one of their classic automatic updates. I will update tomorrow or Tuesday and let you know if the problem has been solved.

I appreciate the help. The Pulse Pal has been an excellent tool for us.
Reply
#4
(02-11-2017, 05:06 PM)Josh Wrote: I don't think that SourceTree could have changed anything - the Pulse Pal master and beta repositories haven't been updated since fall of 2016.

If you're seeing the message about Java, it looks like PsychToolbox wasn't detected.
As a first troubleshooting step, try reinstalling PsychToolbox, following the instructions here.

The error when computing voltage step is likely a firmware mismatch - the firmware expects bytes that are different from what the currently installed MATLAB software is sending it. Try updating the firmware using the file in /PulsePal/Firmware/. If you're using the Gen2 MATLAB software on the beta branch, use PulsePal_2_0_1. For the master branch, use PulsePal_2_0_0.

Which OS and MATLAB / Octave versions are you using?

All right, the problem seems to be mostly resolved. To be honest I'm still not entirely sure what happened to cause the problem in the first place. By my best guess, it seems the beta string was removed from my cloned repository (not really sure, but the folders associated with it weren't in my files). My PulsePals were already updated to 2.0.1 so that explains the disconnect there.

But from my messing around with things I also had to reinstall PsychToolbox, so I'm not sure what eventually fixed the problem.

I will mention that at first, MATLAB wasn't recognizing the PulsePal program with just the Gen2 folder in my MATLAB search paths. I also need the older MATLAB folder to run the programs properly.

[Image: FgDFppz]

This image shows my first attempt to connect my PulsePal with just the Gen2 folder set. On my second attempt the PulsePal properly connects after I've also added the old MATLAB folder to the search paths. It works as it used to now, just wanted to let you know since the directions with the Gen2 folder seem to indicate it should run independently of the old folder.

Thank you again for your help!
Reply
#5
Glad I could help!

You actually don't need the other folders in the path Unfortunately, the Gen2 Interface is still undocumented. You would start it by creating a Pulse Pal object in your workspace:

P = PulsePalObject('COM3')

Then, edit the fields of P to update simulation parameters, e.g:

P.phase1Voltage(3) = 5.8;
P.restingVoltage = [2 2 5 -5];

The functions of the old API are called as methods of the object:

P.sendCustomPulseTrain(TrainID, Times, Voltages)

or

P.trigger(channels)

To see a list of possible functions, type

methods(p)

We are working on the GUI, and the new API will be documented once the UI is ready.

I hope this helps!
Reply
#6
(02-13-2017, 07:02 PM)Josh Wrote: Glad I could help!

You actually don't need the other folders in the path Unfortunately, the Gen2 Interface is still undocumented. You would start it by creating a Pulse Pal object in your workspace:

P = PulsePalObject('COM3')

Then, edit the fields of P to update simulation parameters, e.g:

P.phase1Voltage(3) = 5.8;
P.restingVoltage = [2 2 5 -5];

The functions of the old API are called as methods of the object:

P.sendCustomPulseTrain(TrainID, Times, Voltages)

or

P.trigger(channels)

To see a list of possible functions, type

methods(p)

We are working on the GUI, and the new API will be documented once the UI is ready.

I hope this helps!

Ah, okay, I see now. I was able to get the PulsePal connected by playing around with some code, but couldn't get the GUI to load, probably because it didn't exist in the folder. That helps a lot, though for now it is simpler for me to use the Gen 1 GUI to set everything up. I greatly appreciate it! Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)