jw666 Posted November 12, 2008 Report Share Posted November 12, 2008 Has anyone used 930 Comm32 .dll from Pacific Scientific? The OC930 is an option card that allows serial interface with a pc or plc to a servo motor driver. Pacsci's website has a hardware and software reference manual that gives parameters to set tuning, position, loop gearing, velocity, etc. I have software that allows for the automated setup of a particular motors and drivers interface. I am interested in using Labiew to control speed, direction, acceleration, deceleration, speed feedback, enable, etc. This is done thru a serial port. I am not sure even how to approach initalization of the serial communcation with the dll. The OC930 card appears to only use 9600 baud communication. I am using Labview 7.1 and have the call library function node with several function names including InitComPort930, CommDllCompileTime930, CommDllVersion930, ExeCmd930, GetVar930, PutVar930, SetAxis930. Where do I start? Quote Link to comment
jw666 Posted November 14, 2008 Author Report Share Posted November 14, 2008 All, Just an update, I have been able to use functions InitComPort930, CommDLLVersion930, SetAxis930 with Labview's Call Library function. As for the othe functions, I'm stumped. On Pacific Scientific's website I found interface notes for C, C++. below are the notes. The C / C++ interface is as follows: int InitComPort930(int argPortNum); int ExeCmd930(const char *cmd); int GetVar930(const char *name, double *value); int PutVar930(const char *name, double value); int SetAxis930(int a); What are ExeCmd930, GetVar930 and PutVar930 functions looking for? integers of the vaiables and commanad or what? Thanks in advance, jw666 Quote Link to comment
Shaun Hayward Posted November 14, 2008 Report Share Posted November 14, 2008 Depending on how many (and how complex) the commands you want to use are, you may be able to use LabVIEW's built in RS232 functions (VISA Serial Read/Write) to send the commands directly to the motor without using the company's DLL. In the past, for simple applications, I have found this considerably easier than battling with not-so-well documented 3rd party DLLs. Shaun Quote Link to comment
Rolf Kalbermatter Posted November 18, 2008 Report Share Posted November 18, 2008 QUOTE (jw666 @ Nov 13 2008, 11:10 AM) All,Just an update, I have been able to use functions InitComPort930, CommDLLVersion930, SetAxis930 with Labview's Call Library function. As for the othe functions, I'm stumped. On Pacific Scientific's website I found interface notes for C, C++. below are the notes. The C / C++ interface is as follows: int InitComPort930(int argPortNum); int ExeCmd930(const char *cmd); int GetVar930(const char *name, double *value); int PutVar930(const char *name, double value); int SetAxis930(int a); What are ExeCmd930, GetVar930 and PutVar930 functions looking for? integers of the vaiables and commanad or what? Thanks in advance, const char *name is a C string pointer. So configure the according parameter in the CLN as a String of type C Pointer. double is the C equivalent for a LabVIEW double precision floating point number. So this will need to be a Numeric parameter of type 8-Byte double. The * indicates it is passed by reference so set it to Pass: Pointer to Value. The other has no * so it is Pass: Value. What the actual string should contain is of course entirely to the device or the DLL or maybe even both. Rolf Kalbermatter Quote Link to comment
jw666 Posted December 13, 2008 Author Report Share Posted December 13, 2008 QUOTE (rolfk @ Nov 17 2008, 03:17 PM) const char *name is a C string pointer. So configure the according parameter in the CLN as a String of type C Pointer.double is the C equivalent for a LabVIEW double precision floating point number. So this will need to be a Numeric parameter of type 8-Byte double. The * indicates it is passed by reference so set it to Pass: Pointer to Value. The other has no * so it is Pass: Value. What the actual string should contain is of course entirely to the device or the DLL or maybe even both. Rolf Kalbermatter Thank you for your help. I am way above my level of expertise. I found a way to use simpler serial communication. Thanks again! jw666 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.