Jump to content
  • 0

Port DIO of USB-1208FS-Plus


Roger Lo

Question

6 answers to this question

Recommended Posts

  • 0

The USB-1208FS-Plus cannot combine ports A and B into one 16-bit port.  Instead, you must control them one at a time. 

Port configuration is simple. To set both to be output, use the ulDConfigPort function.

err = ulDConfigPort(daqDeviceHandle, FIRSTPORTA, DD_OUTPUT);

err = ulDConfigPort(daqDeviceHandle, FIRSTPORTB, DD_OUTPUT);

Use ulDOut to update each port as follows:

err = ulDOut(daqDeviceHandle, FIRSTPORTA, data);

err = ulDOut(daqDeviceHandle, FIRSTPORTB, data);

Link to comment
Share on other sites

  • 0
On 6/13/2024 at 11:37 PM, JRys said:

The USB-1208FS-Plus cannot combine ports A and B into one 16-bit port.  Instead, you must control them one at a time. 

Port configuration is simple. To set both to be output, use the ulDConfigPort function.

err = ulDConfigPort(daqDeviceHandle, FIRSTPORTA, DD_OUTPUT);

err = ulDConfigPort(daqDeviceHandle, FIRSTPORTB, DD_OUTPUT);

Use ulDOut to update each port as follows:

err = ulDOut(daqDeviceHandle, FIRSTPORTA, data);

err = ulDOut(daqDeviceHandle, FIRSTPORTB, data);

Hi JRys,

Thanks for the reply.

Now, the customer has another question:

 

For the coding, could you please help to explain the purposes of these two program code?

1.

err = getDioInfoFirstSupportedPortType(daqDeviceHandle, &port_A, portTypeStr);

=> The customer has marked this code to be the annotation, the program still executes fine. They would like to know how and what it affects.

2.

 err = getDioInfoFirstSupportedPortIoType(daqDeviceHandle, &portIoType, portIoTypeStr);

=> This code seems to get the type of Port A. The customer would like to know how to get the type of Port B. Is there any sample code of it?

 

Thank you so much

Link to comment
Share on other sites

  • 0

The functions interrogate the device to determine the number of digital ports and their types. You don't need them if you know the USB-1208FS-PLUS has two 8-bit ports: FIRSTPORTA and FIRSTPORTB. Use UL Help to get the details—there is probably a shortcut to it in the Windows program list under Measurement Computing.  In UL Help, search on the device name to get the page that lists the functions and enumeration. The picture below shows the Digital I/O section on the USB-1208FS-Plus and USB-1408FS-Plus page.

image.png

Link to comment
Share on other sites

  • 0
On 6/18/2024 at 11:52 PM, JRys said:

The functions interrogate the device to determine the number of digital ports and their types. You don't need them if you know the USB-1208FS-PLUS has two 8-bit ports: FIRSTPORTA and FIRSTPORTB. Use UL Help to get the details—there is probably a shortcut to it in the Windows program list under Measurement Computing.  In UL Help, search on the device name to get the page that lists the functions and enumeration. The picture below shows the Digital I/O section on the USB-1208FS-Plus and USB-1408FS-Plus page.

image.png

Hi JRys,

Thanks for the information.

Thank you

Link to comment
Share on other sites

  • 0
On 6/20/2024 at 12:20 AM, Roger Lo said:

Hi JRys,

Thanks for the information.

Thank you

On 6/18/2024 at 11:52 PM, JRys said:

The functions interrogate the device to determine the number of digital ports and their types. You don't need them if you know the USB-1208FS-PLUS has two 8-bit ports: FIRSTPORTA and FIRSTPORTB. Use UL Help to get the details—there is probably a shortcut to it in the Windows program list under Measurement Computing.  In UL Help, search on the device name to get the page that lists the functions and enumeration. The picture below shows the Digital I/O section on the USB-1208FS-Plus and USB-1408FS-Plus page.

image.png

 

Hi JRys,

The customer would like to change the analog input mode from single-ended to differential mode.

I found the UL library only shows there are two modes, but it didn't mention any function of switching mode.

image.thumb.png.caff044cdbe561d7c6765e4457fbb57e.png

Could you please help to provide more detailed information about it?

and if possible, could you please also provide us with a sample code of it for the customer's reference?

Thank you so much

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...