How To Use Asynch Function In Daqfactory For U12?


GW1234

Recommended Posts

There are two functions in U12 to support RS232 comminication, if the firmware version is V1.1 or higher. Anyone knows how to use it in DAQfactory environment?

I used the following sequence but it does not work. I am a hardware guy. Can anyone help me to find the problem? Thanks a lot in advance!!

using("device.LabJack_U12.")

include("D:\Program Files\LabJackU12Legacy\drivers\ljackuw.h")

private long err

err=AsynchConfig(0,0,255,1,0,0,200,1,1,48,2,1) // this is clear: to congig the PORT A, with BR 9600,

global MyRead = {0x11,0x11,0x11,0x11,0x11,0x11}

err=Asynch(0,0,0,0,1,0,9600,0,6,@MyRead) //?

....

Link to comment
Share on other sites

DAQFactory doesn't directly support RS232 on the U12. And why are you trying to do RS232 on it anyway? It'd be much easier to just buy a $20 USB->RS232 converter from Radio Shack (which, btw, I don't recommend for industrial apps, but if you are using a U12 to do RS232, I'm guessing you aren't doing an industrial app).

The functions you are calling, asynchConfig, etc, are not valid DF functions. The pattern with using() and include() is really only for the UD devices (U3, UE9, U6, etc). The only way to get access to these U12 functions would be to load the DLL directly with the extern() function.

Link to comment
Share on other sites

Thanks to your reply!

The problem is that my sensor has a "rs232" output with 0-vcc level. It is not a real RS232, and i have to use rs232 transceiver in order to connect it to a conventional RS232 port in a PC. To make the system simple, i decide to use the Asynch function, and since it is said in Labjack's manual. Also, i worry about the sychronization of the data from DF' normal channels and from PC's RS232 port. Is this a problem?

Actually, in Labjack' forum and this forum, there do have many U12' users need this function.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.