LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and decoding binary packets with serial communication

Solved!
Go to solution

Well something in Read Packet Frame.vi obviously is not quite working as expected. But I really can't say what without having the actual data stream visible. This is where you have to:

 

- Go into single stepping in that way and see what code is executed when and how

- Actually understand what the code is doing

- Understand the protocol and how it supposedly should be working

- Watch the results of each function and understand when it is doing something that is not how it should be

- Conclude where the problem is and make according changes to the code

 

This is the real programming deal and where things get interesting. Without hardware there is not much I can do more for you. So you are on your own from here.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 31 of 38
(1,098 Views)

Thanks a lot for your help, I'll post the code again once I find the issue and fix it.

0 Kudos
Message 32 of 38
(1,093 Views)

I took pictures of the "SubVIs" working in the image below. I think there is something wrong here.
Is everything working right so far?
I explained a little in the picture.
I think I'm starting to understand the code a little more.

 

There are some screenshots I took in the ''Write Packet frame 8.png'' photo. Here it actually says the reason for the error, but I don't understand it 🙂

Download All
0 Kudos
Message 33 of 38
(1,079 Views)

I did a small test with a simulation device and found this problem. Now it should work:

 

rolfk_0-1645115566317.png

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 34 of 38
(1,063 Views)

constructionworker_1-1645117306750.png

 

I just tried the code you shared, still getting the same issue.

The problem is solved, again, the following termination character error 🙂 After setting the terminating character to false, it was solved.

I'm really sorry for bothering you about this.

0 Kudos
Message 35 of 38
(1,055 Views)

I gave the final version of the code. Those who want to add more to the code can add it. It has the knowledge of writing and reading to the sample addresses.

I hope it works well.

0 Kudos
Message 36 of 38
(1,028 Views)

Did you make by any chance any modifications to the last VIs I posted to make them work or was your last problem that you reported caused by your own modifications to previous VIs? I took a quick look at the VIs you posted and they look the same as my last versions. I would like to know if you changed anything on them to make them work, for my own education.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 37 of 38
(1,013 Views)

Hi mr. 

Same as Latest VIs you posted, I didn't make any changes. I just created some examples in a VI named "UM7 MAIN" to write and read information to some parameters using these VI's.

The last problem I had was that the terminating character was still active. When VISA encountered the terminating character, the whole series was shutting down. Fixing this fixed the problem.

0 Kudos
Message 38 of 38
(990 Views)