Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 11:52 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: New to this, sort of
PostPosted: Mon Apr 24, 2006 10:40 am 
Offline

Joined: Mon Apr 24, 2006 10:26 am
Posts: 8
Alrighty, I'm kinda new to the Qlarity language. I've found this to be pretty easy as far as building screens and so on. What I really need to know about is the serial I/O. Is it ASCII or Hex based? How it works, so on so forth.



What I need to be able to do is set some names and numbers in the terminal that will save to flash for a micro. The micro is going to be the master as it does most of the work. The only thing the terminal is for is a human to machine interface. I need the terminal to be able to translate a hex string, and then display the proper output. This stuff is actually pretty complicated on what I'm trying to do. If you need more info you can get a hold of me at josh.s.mcs@gmail.com



Thanks for the help


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 24, 2006 11:02 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Well, I am fairly sure that Qlarity can handle what you need to do.



Qlarity sees serial communication as a stream of 8 bit bytes, which it reports to the Qlarity application in byte arrays which may contain arbitrary 8 bit values (not just 0-9, A-F for hex values).



It is the responsibility of the user application to parse the stream into usable packets or messages, then to do something useful with the message contents. We provide a few examples of doing this that you can view by selecting Help -> Sample Workspaces in Qlarity Foundry, then selecting the Communications section. We can also advise on implementing more complex protocols.



Qlarity has numerous functions for converting data you might receive on the serial port to useful values for processing. These include functions to convert numeric (i.e. integers, bytes, floats, etc) values to strings, strings to numerics. Numerics to a raw sequence of bytes (big or little endian). Numerics to human readable hex strings, hex strings to numerics and so on.



Let us know if you have a specifc question on what you need to do.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 24, 2006 11:05 am 
Offline

Joined: Mon Apr 24, 2006 10:26 am
Posts: 8
That's great, I'll check it out.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 26, 2006 7:47 am 
Offline

Joined: Mon Apr 24, 2006 10:26 am
Posts: 8
Still don't understand the idea of serial communications too well. With what I'm trying to do, I have about 39 objects that have to be constantly updated from a master micro. Along with that, I have several other objects that are displayed and used to change certain settings. Maybe it's just organzation that needs to be applied to it to really understand what's going on. I'm working on a human-machine interface for a heater controller system used in plastic injection molding systems. This particular instance we use 12 controllers, each control 1 zone. Now each zone displays a process temperature, a setpoint temperature (user changable), a mode setting (user changable), amperage, and an error notice. Along with being able to set some settings for each controller, I need to be able to set these types of parameters for multiple controllers at one time also. This information will then be updated at the Micro.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 26, 2006 8:55 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
I think this is beginning to grow beyond the scope of a forum discussion. I think you need to get in direct contact with our Qlarity Application Engineer who can help advise you on the techniques best suited for processing communication in your particular application.



I suspect that the general idea will be to create a BasicSerial object (or an object derived from one), hande the DataReceived event, parse the data and use that to update your 39 display objects. You will then need to create a screen or some sort of form for data input and when input is complete, take that data and convert it into a serial message that the BasicSerial object will transmit.



You can get in contact with our support engineer by calling 801-466-8770 and asking for Qlarity programming support, or by filling out a support request form

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 26, 2006 9:24 am 
Offline

Joined: Mon Apr 24, 2006 10:26 am
Posts: 8
Yeah, that's pretty much the direction that I need to go in.



I have no problem building the screens themselves, but for some reason I'm having trouble grasping the concepts of the serial comunications, maybe I'm overthinking it and making it harder than it actually is. :?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 7:54 am 
I had the same problem when I first came aboard. It's not so bad once you use it abit.



In my case, I use a BasicSerial object. I create my 'message' by making an array of bytes (could be string too)



dim MyMsg[10] as byte

init MyMsg = "Test12345"



Then I send that message by doing:

Transmit(COM1, MyMsg, true)



You can also send data like this without an explicit array:

Transmit(COM1, "MoreData", true)



The most important part is handling the serial objects DataRecieved event. When any serial data is recieved, this event processes it. The SerialObject has a built-in buffer called Buffer where the recieved bytes are stored until they are processed. This is simply a byte array.



I understand and feel your pain, I once was lost too :)



Good Luck

Chris


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group