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.
04-21-2018 03:51 PM
hi ,
I'm relatively familiar with the basics of LabVIEW, but I am new to serial communication with VISA. I have had no luck finding a solution to my problem.
i'm testing a PCB card which has displays , i need to send multiple commands to test displays , but i got no response also i have problem with my buttons they send just the first command
please help
04-21-2018 04:05 PM
Don't use Switch until released on that button. You should be using Latched when Released.
Also, Don't use bytes at port. If your messages have a termination character, and it seems they do since you have left the termination character enabled on your VISA Configure, then you should read a large number and allow the VISA Read to terminate once it receives the termination character.
04-21-2018 04:31 PM
accually , i'm not using termination character . i just want to send hex commands in the same times with buttons .i think i have problem in write event (case loop)
04-21-2018 10:11 PM
Then wire a False to the Enable Termination Character input of the Serial Configure.
Get rid of the number to string function that you wire to the case structure. Perhaps that is the problem. You can wire the enum directly to the case structure selector.
Make sure your VISA reference wire is wired across all cases of the event structure.
Put an indicator on your error wire. Do you know if you are getting any errors? The indicator would clue you in if you were. And if you get one error, that shift register on the error wire will keep any functions from operating the way you want in future iterations.
04-23-2018 07:04 AM
@Safsaf16 wrote:
accually , i'm not using termination character . i just want to send hex commands in the same times with buttons .i think i have problem in write event (case loop)
You still should not be using the Bytes At Port. You obviously have a communication protocol that you are following and expect your device to follow. Use that. Usually with a binary/hex protocol, the messages are either fixed in length, have a message length byte (or two), or some other way of knowing how many bytes are in the message. This will probably require multiple reads in order to get your message correctly (only enough bytes to get the length and then read the rest of the message). But this will guarantee you get the full reply instead of just hoping you did not cut it off.