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

Sending and Reading info U3


  • Please log in to reply
3 replies to this topic

#1 Sujaira

Sujaira
  • Members
  • 13 posts

Posted 04 February 2013 - 09:13 AM

Hello, I need to know if there it's any way I could be having a problem while I'm sending a PWM16 using the FIO4, and at the same time in an other Thread reading from the AIN0, so it's there any way the pins are not getting reset after I'm using them?? I mean if maybe one of the comand it's affecting the other Thread?.

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 04 February 2013 - 11:26 AM

Reading AIN0 should not affect your PWM on FIO4, but it is possible you are doing something in your code that is causing a problem. Do you see the PWM change somehow when you read AIN0? Make the 2 threads as simple as possible (1 thread just calling eAIN and the other thread just calling eTCValues), and then if you still see the problem post some code here for us to look at.

#3 Sujaira

Sujaira
  • Members
  • 13 posts

Posted 07 February 2013 - 08:21 AM

Reading AIN0 should not affect your PWM on FIO4, but it is possible you are doing something in your code that is causing a problem. Do you see the PWM change somehow when you read AIN0?

Make the 2 threads as simple as possible (1 thread just calling eAIN and the other thread just calling eTCValues), and then if you still see the problem post some code here for us to look at.


No I don't see any change in the PWM when I read.. but how can I be sure that the pins are not getting flase data?? how can I reset the pins before I read ?? I read that the Addrequest does that

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 07 February 2013 - 09:10 AM

how can I be sure that the pins are not getting flase data??

I am not sure what sort of false data you are worried about. Are you worried about issues do to threading? Section 4.1.2 points out that the driver is thread-safe:

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

how can I reset the pins before I read ??

I don't understand? What kind of reset do you want to do?


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users