Jump to content
  • 0

USB-1208-FS-Plus Bit 8 and 9 Both Go Low Together


Rob R

Question

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 If

        ulstat = 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 If

        ulstat = 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 If

Bit 8 is set to low.  Bit 9 goes low as well.

What is causing this

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @Rob R.

Do you have a new USB-1208FS-Plus or not familiar with the history of your device?  Do you have a spare USB-1208FS-Plus module to test?

With the USB-1208FS-Plus, the digital ports default as inputs when the device is powered on or reset.  

If you comment out the DBitOut() line from your code, do all of the bits go low?

If you change the bit number in your DBitOut() line from 8 to 9, do the surrounding bits go low?

Regards,

Fausto

Link to comment
Share on other sites

  • 0

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.

 

Edited by Fausto
removed contact info
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...