01-23-2006 02:43 PM
01-24-2006 06:20 PM
When power is being supplied to the NI PCI-6257, the solid-state relays should maintain the last value being written to them. When power is removed from the device there is no way to keep the relays from going to their default state of open. You can however use the following utility to have the device quickly switch to a user defined state quickly after powering up. Take a look at the following Knowledgebase and the attached utility for configuring the powerup states of the NI PCI-6257.
Configurable Power-Up States for NI 6527 Devices01-25-2006 01:10 PM
01-26-2006 04:45 PM
01-28-2006 11:56 PM
It's not a VB but VC code:
void main( int argc, char *argv[])
{
// Define local variablres
short iStatus = 0;
short iRetVal = 0;
short iDevice = 0;
short iPort = 0;
short iLine = 0;
short iDir = 0;
short iState = 0;
short iIgnoreWarning = 0;
enum enum_Direction
{
In=0,
Out
};
enum_Direction enDir = Out;
iLine = 6
iDevice = 1
iPort = 5
// Configure Port to output
iStatus = DIG_Prt_Config (iDevice, iPort, 0, enDir);
iRetVal = NIDAQErrorHandler(iStatus, "DIG_Prt_Config",
iIgnoreWarning);
// Open all outputs
iStatus = DIG_Out_Prt (iDevice, iPort, 0xff);
iRetVal = NIDAQErrorHandler(iStatus, "DIG_Out_Prt",
iIgnoreWarning);
// Set line
iStatus = DIG_Out_Line (iDevice, iPort, iLine, iState);
iRetVal = NIDAQErrorHandler(iStatus, "DIG_Out_Line",iIgnoreWarning);
if(iStatus = 1)
printf(" The digital state of port %d line %d is set to %d\n", iPort, iLine, iState);
}
01-30-2006 06:57 PM - edited 01-30-2006 06:57 PM
Message Edited by Voltage Viper [DE] on 01-30-2006 06:59 PM
01-31-2006 06:18 AM
Hello
1. After PC startup all output lines in HIGH level (It's OK)
2. Due running of my application after iStatus = DIG_Out_Line (iDevice, iPort, iLine, iState); line state changes to LOW (as expected)
To see this i stoped the programm by break point.
3. After my application ends the logic state of the line returns to HIGH (this is my problem, i wont to remain the line in low state)
4. There are no errors while running
5. I think that when my application closes it release nidex32.lib and nidaq32.lib and they reset the card. May be there are another dll/lib that can do my job?
Thanks
02-01-2006 06:40 PM
02-02-2006 10:50 AM
02-02-2006 11:21 AM