Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Write on pin DTR and read on DSR

Hello,
I'm doing a program which is using Rs432 protocol, using my port COM. In order to prevent my program from being cracked, i want to build a little "dongle" : I will (for example link pins 4 and 6), and i will send an information to the pin 4, and assure that this information is in the pin 6. (in the reality, there will be a pic between this two ports, and an algorythm will see if my dongle il linked).
 
But the problem is that i don't understant how to send a message via visa on pin 4, and read it on pin 6 !
 
Does everyone could help me by sending to me an exemple ?
Best Regards,
Vincent.
V-F
0 Kudos
Message 1 of 16
(4,822 Views)

What is RS-432? Do you really mean RS-232 or RS-422? If so, and if you are using LabVIEW, you can use a VISA property node. Select Properties>Serial Settings>Modem Line Settings. Do a write to the DTR State and do a read of the DSR state as shown below.

Message Edited by Dennis Knutson on 08-09-2007 11:59 AM

Message 2 of 16
(4,818 Views)
Hi,
thanks for yous answer. You're wright, it's rs232 !
You answeared to the half of the question : how can I write on the good pin ?
Best regards,
Vincent.
V-F
0 Kudos
Message 3 of 16
(4,808 Views)

The code that I posted an image of, will assert DTR and then read the status of DSR. What about it do you not understand?

All you have to do is compare the output to the input. For completeness, it would be a good idea to also deassert DTR and read the DSR status again.

0 Kudos
Message 4 of 16
(4,803 Views)
Hello,
this is what i've done, but it doesn't concern the value that you give ton one pin and that arrives in the other : It just enable the using of this two pins : becauthe they are linked, if i put the first to 1, the second is enabled too, but I can't set anything value : it is the properties of the VISA port, but not the value.
This is what i've made, but it doesn't work...
If you could help me.
Best regards.
V-F
0 Kudos
Message 5 of 16
(4,802 Views)
Not sure why you have a numeric control wired to DTR state or what values you might be setting it to. Right click on the input to the property node and select Create Control. You can right click on the DSR output and select Create Indicator. Valid values are Unknown, Unasserted, and Asserted. If you select Asserted or Unasserted, the DSR result should match. I'm not sure what DSR will show with an Unknown input for DTR.
0 Kudos
Message 6 of 16
(4,797 Views)
Hello,
did you have seen my attached file ?
How can i send a value on one pin and recover it on a second ?
Best regards,
V-F
0 Kudos
Message 7 of 16
(4,794 Views)
If you have physically shorted the DTR and DSR pins like you mentioned, you are sending data on one pin and reading it on a second. You don't expect to write some floating point value to DTR and see the same value at DSR are you? The only thing you will get back is Unknown, Asserted, or Unasserted. RS-232 is basically digital - on or off.
0 Kudos
Message 8 of 16
(4,790 Views)
re,
this is my problem : i don't want to have a on/off, but a value-value : i send a value on one pin, and i will receive the value on the other pin!
Is this possible ?
V-F
0 Kudos
Message 9 of 16
(4,787 Views)
That is not possible. There is no mechanism with RS-232 to vary the voltage. Though the voltage levels are different, it's the same as digital TTL circuits. On or Off/True or False/Asserted or Unasserted.
0 Kudos
Message 10 of 16
(4,780 Views)