Rob R
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Posts posted by Rob R
-
-
This is the code in my FormLoad Event:
'Configure the Ports to output.
ulstat = Daqboard.DConfigPort(MccDaq.DigitalPortType.FirstPortA, MccDaq.DigitalPortDirection.DigitalOut)
If ulstat.Value <> 0 Then
MessageBox.Show(ulstat.Message, "Universal Library Error ", MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.Close()
End Ifulstat = Daqboard.DConfigPort(MccDaq.DigitalPortType.FirstPortB, MccDaq.DigitalPortDirection.DigitalOut)
If ulstat.Value <> 0 Then
MessageBox.Show(ulstat.Message, "Universal Library Error ", MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.Close()
End Ifulstat = Daqboard.DBitOut(MccDaq.DigitalPortType.FirstPortA, 8, MccDaq.DigitalLogicState.Low)
If ulstat.Value <> 0 Then
MessageBox.Show(ulstat.Message, "Universal Library Error ", MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.Close()
End IfBit 8 is set to low. Bit 9 goes low as well.
What is causing this
-
Thanks Jeffrey. That takes care of it.
-
I get this error message when trying to run the sample code for this device. The board number assigned in instacal is 0. If I change it to 1, I have the same problem:
Here is the offending code snippet:
BoardNum = 0
DaqBoard = New MccDaq.MccBoard(BoardNum) '<======this is the default board number
'change it to what InstaCal has assigned for your USB/PMD-1024HLSULStat = DaqBoard.BoardConfig.GetBoardType(typeVal) ' Get the typeVal property from the MccBoard object
If typeVal <> 0 Then
If typeVal <> 127 Then 'Code for USB/PMD-1024HLS is 127
MyMessage = "A USB/PMD-1024HLS was not assigned to Board " & BoardNum & " in InstaCal." & VB.vbLf _
& "Please run InstaCal to verify the board number and/or " & VB.vbLf _
& "change BoardNum = " & BoardNum & " in the frmDataDisplay_Load event" & VB.vbLf _
& " to the correct board number. Then re-run this program."
r = MsgBox(MyMessage, vbExclamation, "USB/PMD-1024HLS not detected.")
End
End If
End IfThe board tests fine in instacal. typeVal returns 118. If that means anything.
What's wrong?
USB-1208-FS-Plus Bit 8 and 9 Both Go Low Together
in Measurement Computing (MCC)
Posted · Edited by Fausto
removed contact info
I commented out the DBitOut() line. No the bits stay in the state that they were when the program last shut down. The problem is that, if Bit 8 and 9 are high when I shut the app down, they are still high when I start the program up the next time. When this line executes:
ulstat = Daqboard.DBitOut(MccDaq.DigitalPortType.FirstPortA, 8, MccDaq.DigitalLogicState.Low)
They both go low. I can't have that. It causes a crash situation.
Actually if all bits are high, they all go low when the line setting 8 low executes.
I will check to see if this is the case with all of the boards that I have.