02-11-2006 07:57 PM
02-13-2006 06:10 PM
Hi Gary,
Have you tried using WIRE_2_AUTO mode to see if this works? You also might want to try using NI-VISA to see if it's a coding issue. Here's an example:
http://digital.ni.com/public.nsf/websearch/94899E7A1D9BA56586256ED700641615?OpenDocument
Your code looks correct, and it's not apparent off-hand what might be causing this. If the VISA example or auto mode doesn't work, then we might be looking at a configuration or driver issue.
02-14-2006 11:58 AM
02-16-2006 10:16 AM
Hi Gary,
I just noticed that the error you are getting is in "serial.c". I think this uses the RS-232 library and might not have the correct wire mode needed for RS-485. Be sure you are including NiSerial.h from C:\Program Files\National Instruments\NI-Serial.
I also discussed the timing question with R&D and found out that auto mode switched the DTR line right before and right after a transmission, and that this transition occurs much faster than the maximun baud rate of you PCI-485. Auto mode is definitely much faster than executing code to manually switch the DTR.
02-16-2006 10:28 AM
02-17-2006 11:19 AM
I was assuming you were using the older PCI-485/4 board which has a maximum baud rate of 460.8 kb/s. The PCI-8431/4 does have a maximum baud rate of 3 Mb/s with NI-Serial 1.8, and it can control the DTR line in 2-wire auto mode up to 2 Mb/s. In order to have a transitions period between transmitted frames, the transition rate of the DTR must be faster than 500 ns. I don't have the exact timing information, but you can always test this transition timing. Using auto mode, this timing should be consistent.
Were you able to check to make sure you are including NiSerial.h?
03-01-2006 02:47 PM
03-02-2006 06:02 PM
Q1) I see that the error is now in Temp.c. Is Temp.c a file that you created? Is the error generated at the same SetComEscape function? Could you post this c file.
Q2) Which 485 line are you refering to? The TX +- and RX +- lines use bias/pullup resistors to pull the lines to a known state when the tranceiver is tri-stated. The board itself should include these bias resistors, but you chan change them to pull the line to what ever state you wish.
http://digital.ni.com/public.nsf/websearch/12BB6CD900B2D0EF862564980050F5A7?OpenDocument
03-03-2006 10:18 AM
03-07-2006 07:26 AM