Jump to content
  • 0

USB-231 series turns off on sensors on connection


deltauser

Question

Hello, i am trying to obtain data from a USB-231 board with 4 channels. There are two main sensors attached to it that i really  need to obtain the data,

distance sensor:SICK DT50-P1123 200mm to 10m 4-20mA distance sensor

temperature sensor: LM35DZ analog temperature sensor

When i run my programm the DAQami interface stops working, the sensors turn off (i suppose because the values returned are negatives very close to 0 and the laser from the sensor disappears).

I dont know what is happening i attach my programm to this thread, where is the mistake?

 

Program (2).cs

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hello @deltauser.

Only one application should be accessing the USB-231.  If using DAQami, then close your C# application and vice-versa.  I noticed that you declare 4 channels, but your LASTCHANNEL = 0 instead of 3.  Does that change help?

public const int CHANCOUNT = 4;
public const int FIRSTCHANNEL = 0;
public const int LASTCHANNEL = 0;

 

Regards,

Fausto

Link to comment
Share on other sites

  • 0

@deltauser,

What are the versions of Windows OS, DAQami, and InstaCal installed on your target system?

If you disconnect all your sensors from the USB-231, are you able to run DAQami without it stopping or crashing?

Which channels on the USB-231 are you using, i.e. analog input, analog output, digital input, digital output, counter input?

If using analog input channels, are they configured in single-ended or differential mode?  You stated four channels and your C# code mentions differential, but just need confirmation the channel configuration in software matches the physical wiring configuration.

On 9/25/2023 at 2:18 AM, deltauser said:

One thing i noticed is that previous to start up daqami for the first time after a start up sensors are turned off, which i suppose means the board is not sending energy to those channels or ports. How can i get it to do that programatically?

Please clarify your last post. 

What's powering the sensors?

What are the signal levels from each sensor? 

Are you using a 250 Ohm resistor with the distance sensor to convert current to voltage?

Do you have a wiring diagram?

Any images or screen captures to share?

Link to comment
Share on other sites

  • 0
7 minutes ago, Fausto said:

@deltauser,

What are the versions of Windows OS, DAQami, and InstaCal installed on your target system?

If you disconnect all your sensors from the USB-231, are you able to run DAQami without it stopping or crashing?

Which channels on the USB-231 are you using, i.e. analog input, analog output, digital input, digital output, counter input?

If using analog input channels, are they configured in single-ended or differential mode?  You stated four channels and your C# code mentions differential, but just need confirmation the channel configuration in software matches the physical wiring configuration.

Please clarify your last post. 

What's powering the sensors?

What are the signal levels from each sensor? 

Are you using a 250 Ohm resistor with the distance sensor to convert current to voltage?

Do you have a wiring diagram?

Any images or screen captures to share?

  1. Versions of the software i am using:
    1. OS: Windows 10
    2. DAQami version 4.2.1f0, Universal Library Version: 6.73 (drivers)
    3. InstaCal version 6.73
  2. I dont know what channels i am using, i only know that there are 6 in total, 4 analog and 2 digital.
    1. When i open Instacal board configuration says input mode Differential (4ch) imagen.png.d056db2f0ce2da94b7626441d3f0b2f3.png
  3. The thing powering the sensors would be the board, cause when i restart the pc and before starting DAQami, the sensors are turned off. That means that when i click on run on DAQami and on the enable board button of the display the sensors, lights and camera start working (the button i have to press to turn everything on, besides the start adquisition, highlighted in red in the following image)imagen.thumb.png.374c3ae627cf13a3f6d584b4e5d684d7.png

I also attached the configuration file of DAQami to this answer.

I do not have access to any wiring schematics or anything, they drop this project to me and i have no idea which channel is connected to what element as the board doesnt have the number or anything printed on it.  As for if there is any resistence connected to the elements, unless the board has some inner resistence the elements are connected directly to the board. And the board to the pc.

No idea whatsover my only guess right now is that i have to send a signal to somewhere to emulate the same behaviour i can do through the UI (clicking on the green button and the enable board button)

Thanks for your time.

 

daqmiconfig.amicfg

Link to comment
Share on other sites

  • 0

@deltauser,

Thank you for attaching the DAQami configuration file.  I was able to open the file, though I do not have any wires nor sensors connected to an USB-231.  Did you create this configuration or was it part of the project given to you? 

In DAQami, the Configuration Panel shows a Channel Mode set to Single-Ended, which allows a user to select any of the eight available analog input channels.  For this configuration, analog input channels AI2 - AI5 are selected as Active. 

image.png

Those channels represent the device's CH2 - CH5 channels.  Below is an image of the USB-231 terminals for single-ended wiring, with those specific channels highlighted.  (USB-231 User's Guide:  https://files.digilent.com/manuals/USB-231.pdf

image.png

 

You should be able to trace the physical wiring from these terminals to a source.  Likewise, you can trace the signals connected to the two analog output channels and seven digital I/O channels.  

image.png

 

Once you know where the wires are connected, the next step is figuring out how they are used.  DAQami requires a user's interaction.  When you press the green arrow button (or red circle button), the USB-231 device becomes active for acquiring data and controlling outputs (analog and digital).  The 'ENABLE BOARD' channel (DIO5) is configured as an output channel.  According to the digital output specification table #6, in the user's guide, the maximum output voltage from a digital channel is 3.6 V.  Does this LVTTL signal control a circuit in your project?  The label for analog output 0 (AOUT0) shows 'Status LED'.  Is that line controlling your lights?  Keep investigating the other wires.

With regards to your two sensors, SICK DT50-P1123 and LM35DZ, I was able to locate their data sheets.

https://cdn.sick.com/media/pdf/8/68/268/dataSheet_DT50-P1123_1047118_en.pdf

https://www.ti.com/lit/ds/symlink/lm35.pdf

Continue your investigation and keep us posted.

Regards,

Fausto

Link to comment
Share on other sites

  • 0
On 9/29/2023 at 10:48 PM, Fausto said:

@deltauser,

Thank you for attaching the DAQami configuration file.  I was able to open the file, though I do not have any wires nor sensors connected to an USB-231.  Did you create this configuration or was it part of the project given to you? 

In DAQami, the Configuration Panel shows a Channel Mode set to Single-Ended, which allows a user to select any of the eight available analog input channels.  For this configuration, analog input channels AI2 - AI5 are selected as Active. 

image.png

Those channels represent the device's CH2 - CH5 channels.  Below is an image of the USB-231 terminals for single-ended wiring, with those specific channels highlighted.  (USB-231 User's Guide:  https://files.digilent.com/manuals/USB-231.pdf

image.png

 

You should be able to trace the physical wiring from these terminals to a source.  Likewise, you can trace the signals connected to the two analog output channels and seven digital I/O channels.  

image.png

 

Once you know where the wires are connected, the next step is figuring out how they are used.  DAQami requires a user's interaction.  When you press the green arrow button (or red circle button), the USB-231 device becomes active for acquiring data and controlling outputs (analog and digital).  The 'ENABLE BOARD' channel (DIO5) is configured as an output channel.  According to the digital output specification table #6, in the user's guide, the maximum output voltage from a digital channel is 3.6 V.  Does this LVTTL signal control a circuit in your project?  The label for analog output 0 (AOUT0) shows 'Status LED'.  Is that line controlling your lights?  Keep investigating the other wires.

With regards to your two sensors, SICK DT50-P1123 and LM35DZ, I was able to locate their data sheets.

https://cdn.sick.com/media/pdf/8/68/268/dataSheet_DT50-P1123_1047118_en.pdf

https://www.ti.com/lit/ds/symlink/lm35.pdf

Continue your investigation and keep us posted.

Regards,

Fausto

WOW, Thank you for your detailed explanation, it has been of great help for me to understand how the relation between the channels and the physical ports takes place. As for your questions, yes it is a project given to me. However i cannot access it for some time now (they took the machine for another project and i dont have access to it now :( ). However, i was able to contact the guy who develop the whole system and he told me something i was doing wrong.

"in instacal app, change the configuration from 4 channels differencial to 8 single-ended".

Maybe thats why some things were not working properly.

The button enable board (i think is the signal you mention) controls de board yes, it used to reset it in case something goes off. My guess is that its a simple rele that stablish/cuts the power to all the stuff.

I  will keep you informed, once we get the machine back for further testing.

Thank you a lot for your help.

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