LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus

Solved!
Go to solution

I tries communicating with my device through Putty and Hypertermina, But I was getting back was bunch of letters and signs, which were did not make any sence.

Now I am trying to make a simple communication between two computers, I want to be able to send a string of code and it would read it , or sends me back some answer. I eventually need to be able to ask the device for info or send it commands to do something. 

I am reading and looking up examples of writting this in labview and I still have not found out how to do it.

Donya

0 Kudos
Message 11 of 37
(1,880 Views)

A bunch of letters and signs is often what you will get. You need to understand the instrument's protocol and you get that from the manual. It might or might not be ASCII. That is why setting up some sort of trivial connection between 2 pc's would be a waste of time. Just by running the basic serial write and read example on both pc's, you can simply do a write on one pc and just do a read on the other. If you have the correct cable, in less than 5 minutes you can be sending a simple 'Hello' will show up on the other pc but what would that tell you about talking to the actual instrument. Basically, nothing at all since you need to understand the exact commands the instrument requires and the exact format the data will be sent.

Message 12 of 37
(1,864 Views)

I found some examples online which I will be testing on monday, Thank you so much for all the help, I probably need more help on this and I will be asking more questions on this, next week.

Have a good weekend.

Donya

0 Kudos
Message 13 of 37
(1,856 Views)

I hope the examples are instrument specific. Otherwise, I think you are just wasting time.

0 Kudos
Message 14 of 37
(1,852 Views)

Hi everyone,

I am trying to transfer the Data I get from the Front panel to an Excel sheet.

Currently I can copy and paste it from the front panel to the note pad or what ever I want it to be in there, but I cannot keep them organized.

Here are the screen shots of my code and the results.

 

0 Kudos
Message 15 of 37
(1,827 Views)

In general, it is a bad idea you have both the termination character enabled and to also use VISA Bytes at Serial Port. Also, you have the string indicator on the output of the shift register. It would help if you created an indicator on the output of the VISA Read. Run the VI and then make current values default. Save the VI and attach that.

 

I'm not sure if you are getting a header plus data. You may need multiple reads if so. The data looks like it is just comma separated data so you could use the Spreadsheet String to Array function.

0 Kudos
Message 16 of 37
(1,817 Views)

Does this look right to you? I am not sure if I could underestand what you ment that is a little too advanced for me to follow.

I took some screen shots of what I just did and the problem that I have is that I get error for every line that it reads and Its asking me to save the file ( give it a name and save it somewhere)

 

0 Kudos
Message 17 of 37
(1,812 Views)

It has nothing at all to do with what I asked you to do. You added a file write for some reason so of course you are being prompted for a file. What I asked was very, very basic. All that you had to do was right click on the string output of the VISA Read and select Create>Indicator. The make current values default is under the Edit menu.

0 Kudos
Message 18 of 37
(1,807 Views)

I did what you said and made the Indicator , now what do I do?

0 Kudos
Message 19 of 37
(1,803 Views)

I appriciate you teaching me how to do this, I am not ready good with Labview and that is why I am asking for help. I am sure all this stuff is very basic for you but for me its not at all, what  I did before ( which you said it had nothing with what you told me to do) was what someone on the phone from NI told me to do

0 Kudos
Message 20 of 37
(1,802 Views)