From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-22-2017 10:07 AM
I need to send a trigger during eeg data acquisition. The eeg PC is connected to a laptop where LabView is installed. The laptop does not have a parallel port, therefore I am using a USB TTL Module to connect the two PCs.
I am wondering whether there is a way of sending a trigger from LabView through the USB module, as I do not have any DAQ devices...I have also tried using the VISA VI but it does not work (or maybe I am not writing correctly the buffer). Is there anybody able to help?
thanks in advance!
Flavia
Solved! Go to Solution.
06-23-2017 02:43 AM
It's probably possible. Can you clarify some things?
06-24-2017 04:58 AM
06-24-2017 05:14 AM
Great - thank you for the full answers. The question is now much clearer to me.
It now becomes a question of "How do I use LabVIEW to instruct a USB-TTL device to send a digital pulse?" - is that correct?
Can you supply some information about the TTL device? You say it already has its own software through which you have successfully triggered the EEG. If this software is all you need to replace it should probably be quite doable. A model number (for the TTL device) would be helpful, a manual or link to a manual would be even better.
06-24-2017 05:32 AM
It now becomes a question of "How do I use LabVIEW to instruct a USB-TTL device to send a digital pulse?" - is that correct? EXACTLY!
Can you supply some information about the TTL device? You say it already has its own software through which you have successfully triggered the EEG. If this software is all you need to replace it should probably be quite doable. A model number (for the TTL device) would be helpful, a manual or link to a manual would be even better.
THIS IS THE LINK TO THE USB MODULE.
http://www.blackboxtoolkit.com/usbttl.html
THANKS A LOT FOR YOUR HELP!
06-24-2017 06:53 AM - edited 06-24-2017 06:54 AM
I'm uploading a VI I wrote that might work for you - it creates a connection using the VISA Serial nodes included with NI-VISA (but it won't tell you if you haven't installed that - so check!) and should have appropriate parameters for your device.
I'm also posting a snippet below - this is because the Code Capture Tool allows me to backsave a snippet, and it's easier than actually backsaving the VI. I do this because I'm not sure if you have LabVIEW 2017 installed (and if not, you won't be able to open the attachment). You can drag and drop the snippet onto a block diagram.
The code is written with the idea of you being able to make it into a subVI quite easily - you'd need to remove the loop and event structure and perhaps use a case structure to check the inputs and then use the same code that is currently in the Value Change event to make the operation, if the "Send Button" was true - this could be connected in a calling VI using a loop or event structure.
p.s. You should set the value of VISA Port before you press run.
06-26-2017 05:57 AM
thanks!
I have tried to drag and drop it onto a block diagram but it does not allow me to do that. would you be able to save it in a previous version? (I have labview 2013, therefore I am not able to open your attachment).
06-26-2017 06:17 AM - edited 06-26-2017 06:17 AM
Did it give an error message or dialog? The snippet was saved for 2013 so that should work (even though the attachment won't). Apparently some browsers cause trouble, so if it isn't working for you try saving the image to your computer and dragging from explorer.
The attachment below should be 2013 compatible.
06-26-2017 10:45 AM
Thank you so much!
I have just slightly changed your script and now it works perfectly well!!
thanks again!!
Flavia
06-26-2017 08:14 PM
@fla1980 wrote:
Thank you so much!
I have just slightly changed your script and now it works perfectly well!!
thanks again!!
Flavia
Fantastic. Please use the Mark as Solution tool to show this thread is solved if you've managed to get the problem working. This will allow future readers to quickly jump to the post which solved the problem, and also visually marks the thread as solved in the parent (LabVIEW) board.
Some people would also suggest kudos are a good way to give thanks, but me saying that here would really be quite self-serving 😉