How to link analog output and analog input in simulated DAQ device? - labview

I simulate NI PCI-6110 device in NI MAX. In LabView I need to send some signal on AO0 of this device and read THIS signal from the device in other scope (doesn't matter read from AO0 or AI0).
How to configure redirect from AO to AI?
I could link AI and AO with a wire on real/physical device, but I don't know how to do this on simulated device.
LabView 2013 x86.

The simulated input data for DAQmx devices is always going to be a sine wave when called in LabVIEW. If you want to test how your application will respond (in this case output a voltage on the 6110) based on an input, you're going to need to simulate both the input and output with custom code.
I do this by placing a case structure around the DAQmx VIs, with a "Debug?" control OR'd with a "Debug?" global to toggle simulated data. Then in the debug cases you will need to write new code that simulates the acquisition/generation. This allows you to switch between simulated and real data fairly easily for unit testing or integration testing.

Related

Error -200361 using USB-6356 X-series DAQ board for SPI control

I'm using a USB-6356 DAQ board to control an IC via SPI.
I'm using parts of the NI SPI Digital Waveform library to create the digital waveform, then a small wrapper VI to transmit the code.
My IC measures temperature on an RTD, and currently the controlling VI has a 'push for single measurement' style button.
When I push it, the temperature is returned by a series of other VIs running the SPI communication.
After some number of pushes (clicking the button very quickly makes this happen more quickly in time, but not necessarily in number of clicks), the VI generates an error -200361, which is nominally FIFO buffer overflow on the DAQ board.
It's unclear to me if that could actually be the cause of the problem, but I don't think so...
An NI guide describing this error for USB-600{0,8,9} devices looks promising, but following the suggestions didn't help me. I substituted 'DI.UsbXferReqCount' for the analog equivalent, since my read task is digital. Reading the default returned 4, so I changed the property to write and selected '1', but this made no difference.
I tried uninstalling the DAQ board using the Device Manager, unplugging and replugging, but this also didn't change anything.
My guess is that additional clock samples are generated after the end of the 'Finite Samples' part for the Read and Write tasks, and that these might be adding blank data that overflows, but the temperatures returned don't indicate strange data, and I'd have assumed that if this were the case, my VIs would be unable to interpret the data read in as the correct temperature.
I've attached an image of the block diagram for the Transmit VI I'm using, but actually getting it to run would require an entire library of VIs.
The controlling VI is attached to a nearly identical forum post at NI forums.
I think USB-6356 don't have output buffers used for Digital signal. You can try it by NI-MAX, if you select the digital output, you may find that there is no parameters for Samples. It's only output a bool-value(0 or 1) in one time.
You can also use DAQ Assistant in LabVIEW, when you config Digital output, if you select N-Samples or Continuous samples, then push OK button, here comes a Dialog that tell you there is no buffer for lines that you selected.

Use PsychPy to activate MS Kinect (or other IR devices)

Is there a way to activate the MS Kinect out of PsychoPy?
I am using PsychoPy for an experiment and I am using infrared (IR) cameras to capture participants movements. I want to automatically send a marker that is visible to the IR cameras out of the PsychPy environment. The idea is to use the Kinect or another USB IR device (e.g., asus Primesence, or a simple USB mounted IR LED) to send markers for certain events in my experiments (meaning whenever event X is happening in PsychoPy, and IR signal should be emitted from the kinect or another IR Device).
(I cannot use the sound jack to trigger an IR LED since I need the audio exit for the experiment.)
Thanks!
PsychoPy can send signals over the serial or parallel ports or connect to specific equipment like LabJack. See the API docs here: http://www.psychopy.org/api/serial.html, http://www.psychopy.org/api/parallel.html, http://www.psychopy.org/api/hardware.html.
If you can find or build a piece of hardware with LEDs that can respond to one of the ways in which PsychoPy can communicate, then yes, you could control LED IR pulses as required.

Directly Control USB Output?? (any language)

So I know that for a USB port type A there is 2 ouputs/inputs. I'm working on a simple electronic circuit and I would like to ouput datas on to my computer so a program could work with it. How (without it getting too complicated on the circuit side) can I just choose the output of the USB port and read the input just on the on/off level?
Thanks
What you want is the www.Nusbio.net device.
it is an USB device that give any .NET programming languages access to 8 gpios and also SPI and I2c bus.
USB is more complicated than what you are describing. It sounds like what you really want is a serial port, where you can use the TX and RX lines as your output and input to the PC, or manually control the modem control or GPIO pins. You can still do this with USB via a USB to UART Bridge device.
If you are simply looking to toggle an I/O pin, some of these devices also have general purpose I/O pins for this type of thing. You can set it to low/high from the PC if it is set to be an output and read the I/O value if it is an input.
You can talk to it as a serial device from your computer using normal serial communications such as POSIX method for Linux or OSX or the Commuincations API for Windows. In this case you can also set the flow control to manual and use the RTS/CTS pins as GPIOs.
You cannot directly control the USB inputs and outputs like you want to do. However, there are various solutions that involve connecting a USB device to your computer and sending commands to it that use its inputs and outputs. One such solution is called Firmata.

Arduino project using infrared sensor and usb communication

I am planning on doing a small arduino project and would like to know if what I'm thinking would work with a regular arduino board. I'm thinking of buying an Arduino Uno for my project, along with an IR LED and an IR sensor. So here's what I want to go with this:
I want to point the LED towards the sensor, so that the sensor is always detecting light. Then', I'll start "cutting" that light (say, with with my hand) several times. I want the arduino program to time the intervals between the times the light is "cut" and send these times to my computer via USB, so I can process this data.
I've seen many people talk about serial communication between an arduino board and a computer, but I'm not sure how that works. Will it use the same usb connector I use to upload programs to the board, or do I have to buy anything else?
EDIT: tl;dr: I guess my question, in the end, is twofold:
1) Am I able to "talk" to my computer using the built-in USB connector on the board, or is that used solely for uploading programs and I need to buy another one? and
2) Is this project feasible with an Arduino Uno board?
Thanks for the help!
Yes, your project is very feasible.
You use the built in USB connector to both program the device and communicate with it. Check out some examples on the Serial Reference Page
For reading the sensor, you'll want to use either a digital or analog input. For a digital input, you'll likely have to external components to control the light threshold, but it will provide a simple yes or no if something is in front of it. With an analog input, you can use a threshold in code to determine when your hand passes.
Timing can either be done on device with the Millis() function or on the connected computer.

configuring gps module ssf1513

hi i am developing code for gps tracker using gps module ssf1513. i don't know how to configure the gps module to power save mode , please guide me how to enter in input mode.
That board has a SiRF starIII GSC3e/LPx GPS chip.
You can Communicate with it via SiRF's binary protocol or NMEA here are links to the reference manuals for each:
SiRF NMEA Reference Manual
SiRF Binary Reference Manual
How exactly you want to save power is up to you there are tons of ways to reduce power usage with gps (duty cycle control, long sleeps, etc). This will be application dependent.
It my be that the power save mode is automatic, e.g. if you stop polling the device then it may go into power saving mode after a certain time-out, and then wake up again automatically when you start polling it again ?