Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

ljud_GoOne: Slow Execution?


  • Please log in to reply
4 replies to this topic

#1 AdamPsych

AdamPsych
  • Members
  • 3 posts

Posted 22 January 2014 - 09:15 AM

Hello,

 

I'm using a U3 to interface Matlab with an EEG amplifier - The U3 is using its EIO pins to supply an 8-bit binary number in parallel to be read by the EEG system whenever it samples the scalp electrodes (512 times per second).

 

I'm finding that for roughly 1 out of every 20 numbers sent to the EEG amplifier, the word is read before all of the pins have been updated - then is completed/reread 2ms later when the next sample is taken. This means that I'm getting 'noise' values along with the actual flags that I'm sending, which is problematic.

 

So my question is, is there a faster way to execute my instruction to change the state of these 8 EIO pins? Before using LabJacks, we interfaced using the computers' motherboards' built-in parallel port, and the commands sent through those pins did not produce these noise flags (our new computers don't have built-in parallel ports)

 

Any help would be appreciated



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 22 January 2014 - 09:31 AM

So you are trying to update the EIO port 512 times per second using some like ePut(handle,LJ_ioPUT_DIGITAL_PORT,8,Value,8)?

 

What determines when the EEG reads the 8 bits?  Is there a clock signal or something?



#3 AdamPsych

AdamPsych
  • Members
  • 3 posts

Posted 22 January 2014 - 09:50 AM

The status of the 8 EIO lines is read 512 times per second, but a 'flag' is only recorded when the EEG system detects a change - The 8 EIO lines are usually set low, and when there is a flag to send (which happens a couple of times every minute), the EIO lines are set to the appropriate values ('1' or '0') for ~20 milliseconds, then returned to 0v



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 22 January 2014 - 10:47 AM

Are you using a port write or a bit write?  Sounds like you want to use the port write such as ePut(handle,LJ_ioPUT_DIGITAL_PORT,8,Value,8).

 

http://labjack.com/s...ers-guide/4.3.5



#5 AdamPsych

AdamPsych
  • Members
  • 3 posts

Posted 22 January 2014 - 01:28 PM

Dope. That fixed it - thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users