Discussion:
Configuring NI-6503 ports individually
(too old to reply)
mama007
2006-02-27 15:10:53 UTC
Permalink
Hai,
I am trying to confure PCI-6503 ports individually. But the moment I configured the first port, all the remaining ports are going low. I have some relays controlled by DIO and they are getting switched on when the DIO's change stae.How can I prevent his from happening.
This is my code:
 
void _stdcall _export ConfigPort(int ByteBank,int IO_type){   int Hand_Shake  = 0; short errorCode; char errorMessage[50]="";  errorCode= DIG_Prt_Config (Device, ByteBank,Hand_Shake,IO_type);  // Configure Port   if (errorCode < 0)  {   GetNIDAQErrorString(errorCode);      // Get error from error code  MessagePopup ("DIO Setup Error", errorMessage);  // Display error flag  }  }
Once I configure the ports and write the required data, all ports are working fine. But it just the configuration stage that is giving trouble
Any Help....
 
 
TimM(AE)
2006-03-06 13:10:43 UTC
Permalink
Hi Mama007

 

The pull-up or pull-down resistors will only affect the value of the line in tristate (input). As soon as the port is set to output the board will start driving the line and the pull-up or pull-down resistors no longer affect the value of the line. The 6503 uses the 82C55A chip

 

<a href="http://digital.ni.com/public.nsf/websearch/24C2BDAEC19E254C86256BB4006F289D?OpenDocument" target="_blank"> http://digital.ni.com/public.nsf/websearch/24C2BDAEC19E254C86256BB4006F289D?OpenDocument</a>

&nbsp;

which on configuration resets all lines on that particular chip. This is why once you do the DIG_Prt_Config call you see the lines go low

&nbsp;

<a href="http://digital.ni.com/public.nsf/websearch/3E25A9780F2C48B986256120005AF098?OpenDocument" target="_blank"> http://digital.ni.com/public.nsf/websearch/3E25A9780F2C48B986256120005AF098?OpenDocument</a>

&nbsp;

Our newer boards no longer use the 82C55A chip and do not reset all of the lines on the chip when they are configured

&nbsp;

I hope this helps

&nbsp;

Regards

&nbsp;

Tim

&nbsp;

NI UK AE
TimM(AE)
2006-05-11 13:40:15 UTC
Permalink
Hi

&nbsp;

The PCI-6509 has 12 ports with 8 lines per port that are bi-directional, but each port must be configured on a port-by-port basis for input or output.
Here is the link for NI 6509 Help
http://digital.ni.com/manuals.nsf/webAdvsearch/52FD5F9F0606DCC886256DF80056EADF?OpenDocument&amp;vid=niwc&amp;node=132100_US

Here is a link for which Devices the Digital Input/Output (DIO) Lines can be Individually Configured

&nbsp;

<a href="http://digital.ni.com/public.nsf/websearch/FDEE00034B16F5E086256119005DC75A?OpenDocument" target="_blank"> http://digital.ni.com/public.nsf/websearch/FDEE00034B16F5E086256119005DC75A?OpenDocument</a>

&nbsp;

Hope this helps you make an informed decision

&nbsp;

Regards

&nbsp;

Tim

&nbsp;

AE NI UK and Ireland Technical Support
mama007
2006-05-11 14:10:14 UTC
Permalink
Thanks for the reply Tim,
&nbsp;
The documents I downloaded didn't clerley answered my question. They says I can only configure a whole port as in I/P or O/P not individual pins.
My qurrey is will the previously configured and written lines gets reset&nbsp; to default position, when I configure&nbsp;next/different port. This happened on my previous PCI-6503. and I sorted out by configuring ports after the startup and then start reading or writing.
But I prefer to configure the port appropriately everytime I do read/write to&nbsp;prevent damage from any mistakes.
Does this action reset the data on my previously configured lines???
&nbsp;
Thanks
mama007
&nbsp;
TimM(AE)
2006-05-12 13:40:15 UTC
Permalink
Hi

With any E Series, M series, and S Series DAQ devices you can change the direction of a line (input or out put) without changing the state (high 1 or low 0) &nbsp;of the other lines in that port or any other port.

I hope this answer your question?

Regards

Tim

AE NI UK and Ireland Technical Support

Loading...