LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with reading information coming from a software into LabVIEW through Serial port

So your code has to emulate the treadmill or the PC (in the end I mean)?

 

If its the tradmill and you have the spec, then use a second serial port for the LV side and run a serial port between the the two serial ports on your PC.

 

If this is not helpfull, could you slow-down and tell us exactly what you have to accomplish and what resurces are available. I will be visiting a customer tomorow but most of the contributors on this forum should be able to help ONCE they know what needs to be done.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 66
(1,257 Views)
Perhaps you could get by using a loopback tester for the serial port. The application may not like it and may have an issue with it. Another alternative would be to create a very simply LabVIEW application that sits and reads data from the serial port. Have this application listen on COM2 and have your other application (the one you are pressing buttons on) talk on COM1. Connect COM1 to COM2 and you should be able to capture what is being sent. This won't work for anything that requires bidirectional communication though.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 12 of 66
(1,251 Views)

I need to get the software (on the PC) to control the treadmill (new). I have limited documentation. For eg. there is an I/P code A0 or 160 which is for Start belt. I am assuming that by pressing the start treadmill button on the software, would generate A0 and sends it thro' COM port. I just need to verify if that is the case for other icons as well.

 

Receiving side will be a LabVIEW program (that is currently used to control the new treadmill manually). I have to use VISA to obtain the hex codes (A0 for eg) and send notice to treadmill to start.

 

I may not be perfect, but I'm all I got!
0 Kudos
Message 13 of 66
(1,250 Views)

What I find confusing was that in this post, the statement was made "I used Advanced Serial Port Monitor to snoop the port on one of our devices.  I was able to get the results I needed ..."

 

Now it seems you cannot get a device and for some reason, you need to snoop again. This commercial software that you are trying to replicate is obviously doing some checking to make sure a treadmill is there. If you can't get information from the vendor of this software/hardware and you can't connect to the hardware like you did before, you might need to find a new project to work on.Smiley Wink

0 Kudos
Message 14 of 66
(1,245 Views)

@ Mark,

 

Loopback test is what I am going for because I just have one COM port free on the PC. But, the issue is with the software (on the PC) giving the status "No Communication" because I haven't actually connected the device. I want it to connect without actually connecting the device. Also, could you provide details as to how to "listen" to a port on LabVIEW? (I am new to LABVIEW and esp Serial port comm)


I may not be perfect, but I'm all I got!
0 Kudos
Message 15 of 66
(1,242 Views)

@ Dennis,

 

I didnt send that reply on this post. That was suggested by  mtat76.

 

I may not be perfect, but I'm all I got!
0 Kudos
Message 16 of 66
(1,238 Views)

The loopback tester is a standard test connector that ties the recieve and transmit lines of the connection together. It effectively returns the data that was sent back to the sender. You should be able to get one online or pick one up from a Radio Shack. This solution will give the impression to a device connecting to a COM port that something is connected. However, if the application sending data expects specific information to be returned it may not work.

 

The simple LabVIEW program to listen to the port would be essentially a VISA open on the port followed by a continual read of the port. This would be like a loopback tester excepth that you will be able to capture the data that was sent from the sending application. Again, if the sending application is expecting responses from the receiving device (in your case the treadmill) than this solution may not work. If you look at the examples that ship with LabVIEW there should be one for continually reading from the connection.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 17 of 66
(1,233 Views)

Oops, sorry. I thought that was your response.

 

My comments still stand about this software package. If it really expects some actual hardware there (which is simple to code and commonly implemented), you don't have a lot of choices. If the treadmill can't come to your pc, move the pc to the treadmill.

0 Kudos
Message 18 of 66
(1,232 Views)

Mark Yedinak wrote:

The loopback tester .... You should be able to get one ... from a Radio Shack. ...


Have YOU been to Radio Shack lately? They have come a long way since Tandy and to think I purchased all of the components for my first compter from Tandy!

 

Sorry about the side trip but I was teribly disapointed the last time I went looking for a db-25 shell.

 

Dilbert Time!

 

Dilbert walks into Radio Hut and is greeted by a young sales type saying

 

 "Hi, I'm half of your age and know more about computers than you ever will, may I help you?"

 

Dilbert replies

 

"Yes, I need a hlaf dozen niad pulse converters and an anza brush.... or am I bluffing"

 

One of my favorites!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 19 of 66
(1,224 Views)

hmmm.... 😞 Do you think I should first program in LabVIEW without using the software on PC? Like creating the similar buttons on LabVIEW and then sending them on COM port to be received by another LabVIEW program to work on the rxd command? This is to avoid the requirement of that software for constant communication between the device.

 

I may not be perfect, but I'm all I got!
0 Kudos
Message 20 of 66
(1,192 Views)