09-12-2019 07:40 AM - edited 09-12-2019 07:41 AM
Thanks alot its working. The program is running fine but only after completion of the program i get this error which i have upload in the file.
As i work in University lab so i cannot access easily every time oscilloscope. Thats why i need to see these waveforms on my Labview. I know in the video it has been not so clear. But what i m doing is very simple i just programmed my Arduino with that code and just used simple VISA blocks to run my arduino. Normally, we use a reset button to run our program by pressing the button on the arduino. But i want to develop a program that when i run my program through Labview (Reseting of arduino) i saw those waveform (oscilloscope) on Labview. On the other side, i cannot change my code because this code i m using to turn on my MOSFET gates it must be in that sequence and hence it would not be possible for me. Do you have any other suggestion what are DAQs ? I want to develop proper test bench
Thanks
09-12-2019 08:02 AM
@maazqaiser wrote:
Do you have any other suggestion what are DAQs ?
Data AcQuisition devices. (NI Multifunction I/O Devices)
09-23-2019 04:32 AM
Please find the link
@RavensFan wrote:
<
@maazqaiser wrote:
Atleast i get my program run and get the desire waveform on physical oscilloscope as shown in video.
Your video doesn't really show anything about how your code runs. We can barely see the screen. Yes you get a waveform to show up your oscilloscope, but it doesn't show you receiving it in LabVIEW.
@maazqaiser wrote:
Sir if you can see this image. i donot do anything i just write '0' byte now all program is running fine and there is no error like this. So if i change to some other byte. Then i cannot run the program and i get that error.
You get no error because you are asking for 0 bytes and are getting exactly 0 bytes. Warning 1073676294 is saying you happened to get exactly the number of bytes you asked for. As others said, if you ask for bytes and get timeout errors, then you have a communication error.
Are you supposed to Write a command to the o-scope to tell it to send you data? Most communication protocols are based on command/response. You command it to do something then you wait for it to respond. What does the manual say?
https://www.youtube.com/watch?v=PNBun-Pmrjo&feature=youtu.be
Finally, I got the waveform on Labview. I have make a voltage sensor so basically it sense the change of Voltage from the source. I have coded a simple program in Arduino. Using a simple voltage divider. There is value coming on Serial Monitor or on the COM of arduino. It sends that to the labview.
As you can see in the video i change the value from Power Supply. First it was approx 34.5 or 35. Then i change it to 10 Voits it doesnot change the value in the graph of Labview. Then i again try to change down to 4 volts still the graph doesnot show any change. I just want that it works continously as i change the value i get the change in Labview as well. These values which i change from voltage source are coming very accutrately on COM port of Arduino However i have saw it shows the change after approx 5-8 mintues that value comes down to 10 then to 4. However i need to see the abrupt change there on waveform graph on Labview. i think, Labview is bit slow to get that abrupt changes.
Please atleast now help me with that. I m anxiously waiting for your answer.
Maaz
09-23-2019 06:35 AM
Try with previous 2018 version
09-23-2019 06:41 AM
I have Labview 2018. What do you mean by previous version ?
09-23-2019 06:51 AM
I don't see anything in that VI that would be slowing things down, especially to minutes later. But I did notice a few things:
1. You do not need the VISA Open. Just get rid of it.
2. You have your VISA Reference wired through a tunnel when it should be going to the shift register.
3. What exactly is the message format you are sending out of the Arduino? I did not see any serial writes in the code you previously supplied. But I suspect your issues are in how you are interpreting this protocol.
09-23-2019 07:18 AM
@crossrulz wrote:
I don't see anything in that VI that would be slowing things down, especially to minutes later. But I did notice a few things:
1. You do not need the VISA Open. Just get rid of it.
2. You have your VISA Reference wired through a tunnel when it should be going to the shift register.
3. What exactly is the message format you are sending out of the Arduino? I did not see any serial writes in the code you previously supplied. But I suspect your issues are in how you are interpreting this protocol.
I removed VISA Open. I changed now a VI. Little bit please check the video i put the link
https://www.youtube.com/watch?v=VtADrvWqcgE&feature=youtu.be
09-23-2019 07:33 AM
You are doing the same conversion on the same incoming string. Why would you expect the two orange wires to even have a different answer?
You are sending your data like.
sensor1 LF
sensor2 LF
So you wind up sensor 1 and putting that into both waveform channels.
Then you s get sensor 2 and put that into both waveform channels.
Try sending it like
sensor1, sensor2 LF
You are alternating sensor messages. put them together in single message. Then use a Scan from String to break the single message into the two values.
09-23-2019 07:42 AM
@RavensFan wrote:
You are doing the same conversion on the same incoming string. Why would you expect the two orange wires to even have a different answer?
You are sending your data like.
sensor1 LF
sensor2 LF
So you wind up sensor 1 and putting that into both waveform channels.
Then you s get sensor 2 and put that into both waveform channels.
Try sending it like
sensor1, sensor2 LF
You are alternating sensor messages. put them together in single message. Then use a Scan from String to break the single message into the two values.
Thanks alot for your suggestion. I donot know much about the Labview. I will try to figure out what is mean by Scan from string to break message into two values. I m just a beginner can you please adjust my VI i just uploaded it into files.
I will try sending it like :
sensor1, sensor2 LF
Thanks waiting for your answer anxiously.
Maaz
09-23-2019 09:31 AM
I done as what u told me but now i cannot execute my program. Please take a look at my images. As now i m sending like how you told me
Please reply me.
Thanks